2
* Author: Ed Griffiths (edgrif@sanger.ac.uk)
3
* Copyright (c) J Thierry-Mieg and R Durbin, 2001
4
*-------------------------------------------------------------------
5
* Acedb is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
19
*-------------------------------------------------------------------
20
* This file is part of the ACEDB genome database package, written by
21
* Richard Durbin (Sanger Centre, UK) rd@sanger.ac.uk, and
22
* Jean Thierry-Mieg (CRBM du CNRS, France) mieg@kaa.crbm.cnrs-mop.fr
24
* Description: Internal header for blixem code.
26
* Last edited: Jul 6 15:08 2006 (edgrif)
27
* Created: Thu Nov 29 10:59:09 2001 (edgrif)
29
*-------------------------------------------------------------------
31
#ifndef DEF_BLIXEM_P_H
32
#define DEF_BLIXEM_P_H
34
#include <wh/version.h>
35
#include <wh/blxview.h>
38
/* blixem program version and information. */
39
#define BLIXEM_TITLE "Blixem program"
40
#define BLIXEM_DESC "Sequence alignment tool."
42
#define BLIXEM_VERSION 3
43
#define BLIXEM_RELEASE 1
44
#define BLIXEM_UPDATE 1
45
#define BLIXEM_VERSION_NUMBER UT_MAKE_VERSION_NUMBER(BLIXEM_VERSION, BLIXEM_RELEASE, BLIXEM_UPDATE)
46
#define BLIXEM_VERSION_STRING UT_MAKE_VERSION_STRING(BLIXEM_VERSION, BLIXEM_RELEASE, BLIXEM_UPDATE)
47
#define BLIXEM_TITLE_STRING UT_MAKE_TITLE_STRING(BLIXEM_TITLE, BLIXEM_VERSION, BLIXEM_RELEASE, BLIXEM_UPDATE)
48
#define BLIXEM_VERSION_COMPILE BLIXEM_VERSION_STRING " " __TIME__ " "__DATE__
50
/* Really the buffers that use this should be dynamic but I'm not going to do that, this
51
* code is so poor that it doesn't warrant the effort.... */
53
#define LONG_NAMESIZE 1000
56
#define INITDBSEQLEN 50000 /* Initial estimate of max database sequence length */
63
#define max(a,b) (((a) > (b)) ? (a) : (b))
64
#define min(a,b) (((a) < (b)) ? (a) : (b))
67
#define selectFeaturesStr "Feature series selection tool"
68
#define FS(msp) (msp->type == FSSEG || msp->type == XY)
69
#define XY_NOT_FILLED -1000 /* Magic value meaning "value not provided" */
71
/* Shapes of XY data */
72
enum { XY_PARTIAL, XY_INTERPOLATE, XY_BADSHAPE };
75
typedef struct featureSeries_ {
79
float x; /* Series offset on x axis, to bump series on the screen */
80
float y; /* Series offset on y axis */
81
int xy; /* Flag for XY plot series */
86
/* Dotter/Blixem Package-wide functions */
87
Graph blxreadhsp(FILE *seqfile, FILE *exblxfile, char *featurefile, char *qname,
88
int dispstart, int qoffset, char *opts, int *argc, char **argv);
89
char *translate(char *seq, char **code);
90
char *revcomp(char *comp, char *seq);
91
void *compl(char *seq);
92
void argvAdd(int *argc, char ***argv, char *s);
93
void loadFeatures(FILE* fil, MSP **msp);
94
float fs2y(MSP *msp, float *maxy, float height);
95
char Seqtype(char *seq);
96
void blviewRedraw(void);
97
void selectFeatures(void);
98
float fsTotalHeight(MSP *msplist);
99
void parseFS(MSP **MSPlist, FILE *file, char *opts,
100
char **seq1, char *seq1name, char **seq2, char *seq2name) ;
101
void insertFS(MSP *msp, char *series);
102
char *readFastaSeq(FILE *seqfile, char *qname);
105
/* Dotter/Blixem Package-wide variables...........MORE GLOBALS...... */
106
extern char *blixemVersion ;
107
extern char *stdcode1[]; /* 1-letter amino acid translation code */
108
extern int aa_atob[];
109
extern int PAM120[23][23];
110
extern Array fsArr; /* in dotter.c */
111
extern Graph dotterGraph;
112
extern float fsPlotHeight;
113
extern GtkWidget *blixemWindow;
115
#endif /* !defined DEF_BLIXEM_P_H */