source: tags/initial/GDE/CLUSTALW/clustalw.h

Last change on this file was 2, checked in by oldcode, 24 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.8 KB
Line 
1/*#include "/us1/user/julie/dmalloc/malloc.h"*/
2/*********************CLUSTALW.H*********************************************/
3/****************************************************************************/
4
5   /*
6   Main header file for ClustalW.  Uncomment ONE of the following 4 lines
7   depending on which compiler you wish to use.
8   */
9
10/*#define VMS 1                 VAX or ALPHA VMS */
11
12/*#define MAC 1                 Think_C for Macintosh */
13
14/*#define MSDOS 1               Turbo C for PC's */
15
16#define UNIX 1                /*Ultrix/Decstation, Gnu C for
17                                Sun, IRIX/SGI, OSF1/ALPHA */
18
19/***************************************************************************/
20/***************************************************************************/
21
22
23#include "general.h"
24
25#define MAXNAMES                30      /* Max chars read for seq. names */
26#define MAXTITLES               60      /* Title length */
27#define FILENAMELEN     256             /* Max. file name length */
28       
29#define UNKNOWN   0
30#define EMBLSWISS 1
31#define PIR       2
32#define PEARSON   3
33#define GDE       4
34#define CLUSTAL   5     /* DES */
35#define MSF       6 /* DES */
36#define RSF       7     /* JULIE */
37#define USER      8     /* DES */
38#define PHYLIP    9     /* DES */
39
40#define NONE      0
41#define SECST     1
42#define GMASK     2
43
44#define PROFILE 0
45#define SEQUENCE 1
46
47#define BS_NODE_LABELS 2
48#define BS_BRANCH_LABELS 1
49
50#define PAGE_LEN       22   /* Number of lines of help sent to screen */
51
52#define PAGEWIDTH       80  /* maximum characters on output file page */
53#define LINELENGTH      60  /* Output file line length */
54#define GCG_LINELENGTH  50
55
56#ifdef VMS                                              /* Defaults for VAX VMS */
57#define COMMANDSEP '/'
58#define DIRDELIM ']'            /* Last character before file name in full file
59                                                           specs */
60#define INT_SCALE_FACTOR 1000 /* Scaling factor to convert float to integer for profile scores */
61
62#elif MAC
63#define COMMANDSEP '/'
64#define DIRDELIM ':'
65#define INT_SCALE_FACTOR 100  /* Scaling factor to convert float to integer for profile scores */
66
67#elif MSDOS
68#define COMMANDSEP '/'
69#define DIRDELIM '\\'
70#define INT_SCALE_FACTOR 100  /* Scaling factor to convert float to integer for profile scores */
71
72#elif UNIX
73#define COMMANDSEP '-'
74#define DIRDELIM '/'
75#define INT_SCALE_FACTOR 1000 /* Scaling factor to convert float to integer for profile scores */
76#endif
77
78#define NUMRES 32               /* max size of comparison matrix */
79
80#define INPUT 0
81#define ALIGNED 1
82
83#define LEFT 1
84#define RIGHT 2
85
86#define NODE 0
87#define LEAF 1
88
89#define GAPCOL 32               /* position of gap open penalty in profile */
90#define LENCOL 33               /* position of gap extension penalty in profile */
91
92typedef struct node {           /* phylogenetic tree structure */
93        struct node *left;
94        struct node *right;
95        struct node *parent;
96        float dist;
97        sint  leaf;
98        int order;
99        char name[64];
100} stree, *treeptr;
101
102/*
103   Prototypes
104*/
105
106/* alnscore.c */
107void aln_score(void);
108/* interface.c */
109void parse_params(Boolean);
110void init_amenu(void);
111void init_interface(void);
112void    main_menu(void);
113FILE    *open_output_file(char *, char *, char *, char *);
114FILE    *open_explicit_file(char *);
115sint seq_input(Boolean);
116Boolean open_alignment_output(char *);
117void create_alignment_output(sint fseq,sint lseq);
118void align(char *phylip_name);
119void profile_align(char *p1_tree_name,char *p2_tree_name);/* Align 2 alignments */
120void make_tree(char *phylip_name);
121void get_tree(char *phylip_name);
122sint profile_input(void);                        /* read a profile */
123void new_sequence_align(char *phylip_name);
124Boolean user_mat(char *, short *, short *);
125void get_help(char);
126void clustal_out(FILE *, sint, sint, sint, sint);
127void nbrf_out(FILE *, sint, sint, sint, sint);
128void gcg_out(FILE *, sint, sint, sint, sint);
129void phylip_out(FILE *, sint, sint, sint, sint);
130void gde_out(FILE *, sint, sint, sint, sint);
131void print_sec_struct_mask(int prf_length,char *mask,char *struct_mask);
132void fix_gaps(void);
133
134
135/* calcgapcoeff.c */
136void calc_gap_coeff(char **alignment, sint *gaps, sint **profile, Boolean struct_penalties,
137                   char *gap_penalty_mask, sint first_seq, sint last_seq,
138                   sint prf_length, sint gapcoef, sint lencoef);
139/* calcprf1.c */
140void calc_prf1(sint **profile, char **alignment, sint *gaps, sint matrix[NUMRES ][NUMRES ], 
141               sint *seq_weight, sint prf_length, sint first_seq, sint last_seq);
142/* calcprf2.c */
143void calc_prf2(sint **profile, char **alignment, sint *seq_weight, sint prf_length,
144               sint first_seq, sint last_seq);
145/* calctree.c */
146void calc_seq_weights(sint first_seq, sint last_seq,sint *seq_weight);
147void create_sets(sint first_seq, sint last_seq);
148sint read_tree(char *treefile, sint first_seq, sint last_seq);
149void clear_tree(treeptr p);
150sint calc_similarities(sint nseqs);
151/* clustalw.c */
152int main(int argc, char **argv);
153/* gcgcheck.c */
154int SeqGCGCheckSum(char *seq, sint len);
155/* malign.c */
156sint malign(sint istart,char *phylip_name);
157sint seqalign(sint istart,char *phylip_name);
158sint palign1(void);
159float countid(sint s1, sint s2);
160sint palign2(char *p1_tree_name,char *p2_tree_name);
161/* pairalign.c */
162sint pairalign(sint istart, sint iend, sint jstart, sint jend);
163/* prfalign.c */
164lint prfalign(sint *group, sint *aligned);
165/* random.c */
166unsigned long linrand(unsigned long r);
167unsigned long addrand(unsigned long r);
168void addrandinit(unsigned long s);
169/* readmat.c */
170void init_matrix(void);
171sint get_matrix(short *matptr, short *xref, sint matrix[NUMRES ][NUMRES ], Boolean neg_flag,
172                sint scale);
173sint read_user_matrix(char *filename, short *usermat, short *xref);
174int getargs(char *inline1, char *args[], int max);
175/* sequence.c */
176void fill_chartab(void);
177sint readseqs(sint first_seq);
178/* showpair.c */
179void show_pair(void);
180/* trees.c */
181void phylogenetic_tree(char *phylip_name,char *clustal_name,char *dist_name);
182void bootstrap_tree(char *phylip_name,char *clustal_name);
183sint dna_distance_matrix(FILE *tree);
184sint prot_distance_matrix(FILE *tree);
185void guide_tree(FILE *tree,int first_seq,sint nseqs);
186
187/* util.c */
188
189void alloc_aln(sint nseqs);
190void realloc_aln(sint first_seq,sint nseqs);
191void free_aln(sint nseqs);
192void alloc_seq(sint seq_no,sint length);
193void realloc_seq(sint seq_no,sint length);
194void free_seq(sint seq_no);
195
196void *ckalloc(size_t bytes);
197void *ckrealloc(void *ptr, size_t bytes);
198void *ckfree(void *ptr);
199char prompt_for_yes_no(char *title,char *prompt);
200void fatal(char *msg, ...);
201void error(char *msg, ...);
202void warning(char *msg, ...);
203void info(char *msg, ...);
204char *rtrim(char *str);
205char *blank_to_(char *str);
206char *upstr(char *str);
207char *lowstr(char *str);
208void getstr(char *instr, char *outstr);
209double getreal(char *instr, double minx, double maxx, double def);
210int getint(char *instr, int minx, int maxx, int def);
211void do_system(void);
212Boolean linetype(char *line, char *code);
213Boolean keyword(char *line, char *code);
214Boolean blankline(char *line);
215void get_path(char *str, char *path);
216
217
Note: See TracBrowser for help on using the repository browser.