#include #include #include #include "clustalw.h" /* * Prototypes */ extern void *ckalloc(size_t); extern void init_interface(void); extern void init_matrix(void); extern void fill_chartab(void); extern void parse_params(Boolean); extern void x_menu(void); /* * Global variables */ double **tmat; char revision_level[] = "X (1.83)"; /* JULIE feb 2001*/ Boolean interactive=TRUE; #ifdef MSDOS char *help_file_name = "clustalx.hlp"; #else char *help_file_name = "clustalx_help"; #endif sint max_names; /* maximum length of names in current alignment file */ float gap_open, gap_extend; float pw_go_penalty, pw_ge_penalty; FILE *tree; FILE *clustal_outfile, *gcg_outfile, *nbrf_outfile, *phylip_outfile, *gde_outfile, *nexus_outfile; FILE *fasta_outfile; /* Ramu */ sint *seqlen_array; sint max_aln_length; short usermat[NUMRES][NUMRES], pw_usermat[NUMRES][NUMRES]; short score_matrix[NUMRES][NUMRES],score_dnamatrix[NUMRES][NUMRES]; short segment_matrix[NUMRES][NUMRES],segment_dnamatrix[NUMRES][NUMRES]; short def_aa_xref[NUMRES+1], aa_xref[NUMRES+1], pw_aa_xref[NUMRES+1]; short userdnamat[NUMRES][NUMRES], pw_userdnamat[NUMRES][NUMRES]; short def_dna_xref[NUMRES+1], dna_xref[NUMRES+1], pw_dna_xref[NUMRES+1]; short score_aa_xref[NUMRES+1],score_dna_xref[NUMRES+1]; short segment_aa_xref[NUMRES+1],segment_dna_xref[NUMRES+1]; sint nseqs; sint nsets; sint *output_index; sint **sets; sint *seq_weight; sint max_aa; sint gap_pos1; sint gap_pos2; sint mat_avscore; sint profile_no; Boolean usemenu=FALSE; Boolean dnaflag; Boolean distance_tree; char **seq_array; char **names,**titles; char **args; char seqname[FILENAMELEN+1]; char *gap_penalty_mask1 = NULL, *gap_penalty_mask2 = NULL; char *sec_struct_mask1 = NULL, *sec_struct_mask2 = NULL; sint struct_penalties; char *ss_name1 = NULL, *ss_name2 = NULL; Boolean user_series = FALSE; UserMatSeries matseries; short usermatseries[MAXMAT][NUMRES][NUMRES]; short aa_xrefseries[MAXMAT][NUMRES+1]; extern Int2 Main(void) { int i; #ifndef WIN_MAC #ifdef GetArgc int argc; char **argv; argc=GetArgc(); argv=GetArgv(); #else extern int argc; extern char **argv; #endif #endif init_interface(); init_matrix(); fill_chartab(); #ifndef WIN_MAC if(argc>1) { args = (char **)ckalloc(argc * sizeof(char *)); for(i=1;i