~ubuntu-branches/ubuntu/precise/acedb/precise

« back to all changes in this revision

Viewing changes to w9/blixem_.h

  • Committer: Bazaar Package Importer
  • Author(s): Steffen Moeller
  • Date: 2010-07-11 06:27:12 UTC
  • Revision ID: james.westby@ubuntu.com-20100711062712-f1mtli96gavo7mk4
Tags: upstream-4.9.39
ImportĀ upstreamĀ versionĀ 4.9.39

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  File: blixem_.h
 
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.
 
9
 * 
 
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.
 
14
 * 
 
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
 
23
 *
 
24
 * Description: Internal header for blixem code.
 
25
 * HISTORY:
 
26
 * Last edited: Jul  6 15:08 2006 (edgrif)
 
27
 * Created: Thu Nov 29 10:59:09 2001 (edgrif)
 
28
 * CVS info:   $Id$
 
29
 *-------------------------------------------------------------------
 
30
 */
 
31
#ifndef DEF_BLIXEM_P_H
 
32
#define DEF_BLIXEM_P_H
 
33
 
 
34
#include <wh/version.h>
 
35
#include <wh/blxview.h>
 
36
 
 
37
 
 
38
/*            blixem program version and information.                        */
 
39
#define BLIXEM_TITLE   "Blixem program"
 
40
#define BLIXEM_DESC    "Sequence alignment tool."
 
41
 
 
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__
 
49
 
 
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.... */
 
52
#define NAMESIZE    12
 
53
#define LONG_NAMESIZE 1000
 
54
 
 
55
 
 
56
#define INITDBSEQLEN 50000   /* Initial estimate of max database sequence length */
 
57
 
 
58
 
 
59
#define MAXLINE 10000
 
60
 
 
61
 
 
62
/* remove ?? */
 
63
#define max(a,b)        (((a) > (b)) ? (a) : (b))
 
64
#define min(a,b)        (((a) < (b)) ? (a) : (b))
 
65
 
 
66
 
 
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" */
 
70
 
 
71
/* Shapes of XY data */
 
72
enum { XY_PARTIAL, XY_INTERPOLATE, XY_BADSHAPE };
 
73
 
 
74
  
 
75
typedef struct featureSeries_ {
 
76
    char  *name;
 
77
    int    nr;
 
78
    int    on;
 
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 */
 
82
} FEATURESERIES;
 
83
 
 
84
 
 
85
 
 
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);
 
103
 
 
104
 
 
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;
 
114
 
 
115
#endif /*  !defined DEF_BLIXEM_P_H */