Next version of JABA
[jabaws.git] / binaries / src / fasta34 / defs.h
1 /* Concurrent read version */
2
3 /* $Name: fa_34_26_5 $ - $Id: defs.h,v 1.26 2006/06/22 02:35:05 wrp Exp $ */
4
5 #ifdef SUNOS
6 #include <sys/stdtypes.h>
7 #endif
8
9 #ifndef IS_BIG_ENDIAN
10 #if defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN)
11 #define IS_BIG_ENDIAN
12 #else
13 #undef IS_BIG_ENDIAN
14 #endif
15 #endif
16
17 #if !defined(MAX_WORKERS) && !defined(PCOMPLIB)
18 #define MAX_WORKERS 1
19 #endif
20
21 /* 3-Oct-2003 - we can now have 2 nucleotide query types, DNA
22    and RNA.  pst.dnaseq can also be SEQT_RNA.
23    ldnaseq can only be DNA */
24
25 #define SEQT_DNA 1
26 #define SEQT_RNA 3      /* DNA and RNA seqtypes must be odd */
27
28 #define SEQT_PROT 0
29 #define SEQT_UNK -1
30 #define SEQT_OTHER 2
31
32 #ifndef DEF_NMLEN
33 #define DEF_NMLEN 6
34 #endif
35
36 /* unfortunately, there is an important relationship between MAXTRN and
37    MAXTST+MAXLIB embedded here.  MAXTRN must be >= (MAXTST+MAXLIB)/3
38    or it will be possible for a translated DNA sequence to be longer
39    than the translation space available */
40
41 #define MAX_STR 512 /* standard label/message buffer */
42 #define MAX_SSTR 32 /* short string */
43 #define MAX_FN  120 /* maximum size of a file name */
44 #define MAX_CH  40 /* maximum number of library choices */
45 #ifndef SMALLMEM
46 #define MAX_LF  500 /* maximum numer of library files */
47 #else
48 #define MAX_LF  80 /* maximum numer of library files */
49 #endif
50
51 /* padding at the end of sequences for ALTIVEC, other vector
52    processors */
53 #define SEQ_PAD 16
54
55 #define MAX_UID 20 /* length of libstr, used for character keys with SQL */
56
57 #define AVE_AA_LEN 400
58 #define AVE_NT_LEN 5000
59 #define MAX_AA_BUF 5000         /* 5000 later */
60 #define MAX_NT_BUF 1000         /* 2000 later */
61
62 #ifndef SMALLMEM
63 #define MAXTST  40000           /* longest query */
64 #define MAXLIB  120000          /* longest library */
65 #define MAXPLIB 600000          /* longest library with p_comp* */
66 #define MIN_RES 2000            /* minimum amount allocated for alignment */
67 #ifndef TFAST
68 #define MAXTRN  80000           /* buffer for fastx translation */
69 #else
70 #define MAXTRN 180000           /* buffer for tfastx translation */
71 #endif
72 #define SEQDUP  1200            /* future - overlap */
73 #ifndef PCOMPLIB
74 #ifndef MAXBEST
75 #define MAXBEST 60000   /* max number of best scores */
76 #endif
77 #define MAXSTATS 60000
78 #else
79 #ifndef MAXBEST
80 #define MAXBEST 60000   /* max number of best scores */
81 #endif
82 #define MAXSTATS 60000
83 #endif
84 #define BIGNUM  1000000000
85 #ifndef MAXINT
86 #define MAXINT 2147483647
87 #endif
88 #define MAXLN   120     /* size of a library name */
89 #else
90 #define MAXTST  1500
91 #define MAXLIB  10000
92 #define MAXPLIB 100000          /* longest library with p_comp* */
93 #define MIN_RES 1000
94 #ifndef TFAST
95 #define MAXTRN  6000
96 #else
97 #define MAXTRN 11500
98 #endif
99 #define SEQDUP  300
100 #define MAXBEST 2000
101 #define MAXSTATS 20000
102 #define BIGNUM  32767
103 #define MAXINT  32767
104 #define MAXLN   40      /* size of a library name */
105 #endif
106 #if !defined(TFAST)
107 #define MAXTOT (MAXTST+MAXLIB)
108 #define MAXDIAG (MAXTST+MAXLIB)
109 #else
110 #define MAXTOT (MAXTST+MAXTRN)
111 #define MAXDIAG (MAXTST+MAXTRN)
112 #endif
113
114 #define MAXPAM  600     /* maximum allowable size of the pam matrix */
115 #define PROF_MAX 500
116 #define ALF_MAX 30
117
118 #ifdef SUPERFAMNUM
119 #define NSFCHAR '!'
120 #endif
121
122 #define max(a,b) (((a) > (b)) ? (a) : (b))
123 #define min(a,b) (((a) < (b)) ? (a) : (b))
124
125 #define MX_ATYPE 7      /* markx==0,1,2 7=> no alignment */
126 #define MX_ASEP  8      /* markx==3  - separate lines */
127 #define MX_AMAP  16     /* markx==4,5 - graphic map */
128 #define MX_HTML  32     /* markx==6  - HTML */
129 #define MX_M9SUMM 64    /* markx==9(c) */
130 #define MX_M10FORM 128  /* markx==10 */
131
132 /* codes for -m 9 */
133 #define SHOW_CODE_ID    1       /* identity only */
134 #define SHOW_CODE_ALIGN 2       /* encoded alignment */