File: clustalw.h

package info (click to toggle)
clustalx 2.1%2Blgpl-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 3,324 kB
  • sloc: cpp: 40,050; sh: 163; xml: 102; makefile: 16
file content (303 lines) | stat: -rw-r--r-- 6,951 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
/**
 * Author: Mark Larkin
 * 
 * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
 *
 * Changes:
 *
 * 13-02-07,Nigel Brown(EMBL): Increased maximum sequence identifier
 * width MAXNAMES from 30 to 150.
 * 20-12-07, Paul McGettigan: bug #53 change MAXNAMESTODISPLAY back to 10 from 30
 */

#ifndef CLUSTALW_H
#define CLUSTALW_H
/* Mark tidy up Nov 2005 */
/*********************CLUSTALW.H*********************************************/
/****************************************************************************/

/*
 *** AW NOT NEEDED ANYMORE since 2.0.9
 *** done via including config.h(clustalw) or DEFINE(clustalx)
 * Main header file for ClustalW.  Uncomment ONE of the following 4 lines
 * depending on which compiler you wish to use.
 */
/* NOT SUPPORTED #define VMS 1                 VAX or ALPHA VMS */
/* Think_C for Macintosh */
//#define MAC 1 */
/* Turbo C for PC's */
// #define WINDOWS 1
/* unix */
//#define UNIX 1
// d


#define DEBUGFULL 0
const bool DEBUGLOG = false;
/***************************************************************************/
/***************************************************************************/


#include "general.h"
#include "Array2D.h"
#include "SquareMat.h"
#include "SymMatrix.h"
#include <vector>
#include <string>
using namespace std;
namespace clustalw
{

typedef SymMatrix DistMatrix;
typedef std::vector<vector <int> > TreeGroups;

struct TreeNames
{
    string phylipName;
    string clustalName;
    string distName;
    string nexusName;
    string pimName;
};

struct AlignmentFileNames
{
    string treeFile;
    string profile2TreeFile;
    string clustalFile; 
    string nrbfFile;
    string gcgFile;
    string phylipFile;
    string gdeFile;
    string nexusFile;
    string fastaFile;
};

struct TreeNode
{
    // phylogenetic tree structure
    struct TreeNode *left;
    struct TreeNode *right;
    struct TreeNode *parent;
    float dist;
    int leaf;
    int order;
    string name;
};

struct PhyloTree
{
    TreeGroups treeDesc;
    vector<double> leftBranch;
    vector<double> rightBranch;
};
struct SeqInfo
{
    int firstSeq;
    int lastSeq;
    int numSeqs;
};

struct LowScoreSegParams
{
    int firstSeq; 
    int nSeqs;
    int lastSeq;
    int nCols;
    vector<int>* seqWeight;
    Array2D<int>* lowScoreRes;
    bool seqWeightCalculated;
};
/* Global constants */
const int extraEndElemNum = 2;
const int ENDALN = 127;
const int OK = -200;
const int CANNOTOPENFILE = -300;
const int NOSEQUENCESINFILE = -400;
const int OTHERERROR = -500;
const int ALLNAMESNOTDIFFERENT = -600;
const int MUSTREADINPROFILE1FIRST = -700;
const int EMPTYSEQUENCE = -800;
const int SEQUENCETOOBIG = -900;
const int BADFORMAT = -1000;
     
const int AABLOSUM = 0;
const int AAPAM = 1;
const int AAGONNET = 2;
const int AAIDENTITY = 3;
const int AAUSERDEFINED = 4;

const int PWAABLOSUM = 0;
const int PWAAPAM = 1;
const int PWAAGONNET = 2;
const int PWAAIDENTITY = 3;
const int PWAAUSER = 4;

const int DNAIUB = 0;
const int DNACLUSTALW = 1;
const int DNAUSERDEFINED = 2;

const int AAHISTIDENTITY = 0;
const int AAHISTGONNETPAM80 = 1;
const int AAHISTGONNETPAM120 = 2;
const int AAHISTGONNETPAM250 = 3;
const int AAHISTGONNETPAM350 = 4;
const int AAHISTUSER = 5;

const int QTAASEGGONNETPAM80 = 0;
const int QTAASEGGONNETPAM120 = 1;
const int QTAASEGGONNETPAM250 = 2;
const int QTAASEGGONNETPAM350 = 3;
const int QTAASEGUSER = 4;

const int MAXHYDRESIDUES = 9; // Only allowing 9 hyd residue choices
const int Protein = 0;
const int DNA = 1;
const int Pairwise = 0;
const int MultipleAlign = 1;

const int OUTSECST = 0;
const int OUTGAP = 1;
const int OUTBOTH = 2;
const int OUTNONE = 3;

const int MAXNAMES = 150;    /* Max chars read for seq. names */ //nige, was 30
//const int MAXNAMESTODISPLAY = 30; // Used for printout. Mark 18-7-07
//const int MAXNAMESTODISPLAY = 10; // Bug #53. Paul 20-12-07
const int MAXNAMESTODISPLAY = 30; //Paul replicate 1.83 behavour 9-2-08
const int MINNAMESTODISPLAY = 10; //Paul replicate 1.83 behavour 9-2-08
const int MAXTITLES = 60;      /* Title length */
const int FILENAMELEN = 256;             /* Max. file name length */

const int  UNKNOWN  = 0;
const int  EMBLSWISS = 1;
const int  PIR      = 2;
const int  PEARSON  = 3;
const int  GDE = 4;
const int  CLUSTAL = 5;    /* DES */
const int  MSF = 6; /* DES */
const int  RSF = 7;    /* JULIE */
const int  USER = 8;    /* DES */
const int  PHYLIP = 9;    /* DES */
const int  NEXUS = 10; /* DES */
const int  FASTA = 11; /* Ramu */

const int  NONE = 0;
const int  SECST = 1;
const int  GMASK = 2;

const int  PROFILE = 0;
const int  SEQUENCE = 1;

const int  BS_NODE_LABELS = 2;
const int  BS_BRANCH_LABELS = 1;

const int  PAGE_LEN = 22;   /* Number of lines of help sent to screen */

const int  PAGEWIDTH = 80;  /* maximum characters on output file page */
const int  LINELENGTH = 60;  /* Output file line length */
const int  GCG_LINELENGTH = 50;

const int NJ = 1;
const int UPGMA = 2;

const int ALIGNMENT = 1;
const int TREE = 2;

const int MinIdentifier = 1;

const string VALID_COMMAND_SEP = "-/";

#ifdef OS_MAC
    const char default_commandsep = '-';
    const char DIRDELIM = '/';
    const int INT_SCALE_FACTOR = 100;  /* Scaling factor to convert float to integer
        for profile scores */

#elif OS_WINDOWS
    const char  default_commandsep = '/';
    const char DIRDELIM = '\\';
    const int INT_SCALE_FACTOR = 100;  /* Scaling factor to convert float to integer
        for profile scores */

#elif OS_UNIX
    const char default_commandsep = '-';
    const char DIRDELIM = '/';
    const int INT_SCALE_FACTOR = 1000; /* Scaling factor to convert float to integer
        for profile scores */
#endif

       
const int NUMRES = 32; /* max size of comparison matrix */
const int INPUT = 0;
const int ALIGNED = 1;

const int LEFT = 1;
const int RIGHT = 2;

const int NODE = 0;
const int LEAF = 1;

const int GAPCOL = 32;        /* position of gap open penalty in profile */
const int LENCOL = 33;        /* position of gap extension penalty in profile */

typedef struct
{
   /* Holds values for the pairwise scales */
   float gapOpenScale; 
   float gapExtendScale;
   int intScale; 
}PairScaleValues;

typedef struct
{
    float scale;
    float intScale;
}PrfScaleValues;
 
typedef struct node
{
     /* phylogenetic tree structure */
    struct node *left;
    struct node *right;
    struct node *parent;
    float dist;
    int leaf;
    int order;
    char name[64];
} stree,  *treeptr;

typedef struct
{
    char title[30];
    char string[30];
} MatMenuEntry;

typedef struct
{
    int noptions;
    MatMenuEntry opt[10];
} MatMenu;

const int MAXMAT = 10;

typedef struct
{
    int llimit;
    int ulimit;
    vector<short>* matptr;
    vector<short>* AAXref;
} SeriesMat;

/*
 * UserMatSeries holds the number of matrices in the series and 
 */
typedef struct
{
    int nmat;
    SeriesMat mat[MAXMAT];
} UserMatrixSeries;

}
#endif