8 #include "io_lib_header.h"
9 #include "util_lib_header.h"
10 #include "dp_lib_header.h"
11 #include "define_header.h"
14 static char * get_seq_type_from_cl (int argc, char **argv);
15 static char *get_defaults(char *buf, char *type);
16 static char *get_evaluate_defaults(char *buf, char *type);
17 static char *get_genome_defaults(char *buf, char *type);
18 static char *get_dali_defaults(char *buf, char *type);
19 static char *get_mcoffee_defaults(char *buf, char *type);
20 static char *get_fmcoffee_defaults(char *buf, char *type);
21 static char *get_t_coffee_defaults(char *buf, char *type);
23 static char *get_dmcoffee_defaults(char *buf, char *type);
24 static char *get_rcoffee_consan_defaults(char *buf, char *type);
26 static char *get_rmcoffee_defaults(char *buf, char *type);//Original R-Coffee Paper
27 static char *get_rcoffee_defaults(char *buf, char *type);//Original R-Coffee Paper
28 static char *get_rmcoffee_defaults_old(char *buf, char *type);//Original R-Coffee Paper
29 static char *get_rcoffee_defaults_old(char *buf, char *type);//Original R-Coffee Paper
30 static char *get_best4RNA_defaults(char *buf, char *type);
32 static char *get_very_fast_defaults(char *buf, char *type);
33 static char *get_precomputed_defaults(char *buf, char *type);
34 static char *get_3dcoffee_defaults(char *buf, char *type);
35 static char *get_expresso_defaults(char *buf, char *type);
37 static char *get_accurate_defaults(char *buf, char *type);
38 static char *get_accurate4PROTEIN_defaults(char *buf, char *type);
39 static char *get_accurate4DNA_defaults(char *buf, char *type);
40 static char *get_accurate4RNA_defaults(char *buf, char *type);
42 static char *get_psicoffee_defaults(char *buf, char *type);
43 static char *get_dna_defaults(char *buf, char *type);
44 static char *get_cdna_defaults(char *buf, char *type);
45 static char *get_repeat_defaults(char *buf, char *type);
46 static char *get_low_memory_defaults( char *buf, char *type);
48 static int set_methods_limits (char **method_limits,int n_methods_limit,char **list_file, int n_list, int *maxnseq, int *maxlen);
49 static FILE *t_coffee_tip (FILE *fp,char *mode);
51 static int run_other_pg(int argc, char *argv[]);
52 static char* prepare_one2all (char *seq,Sequence *S, char *lib_file);
53 static char* prepare_subset2all (char *seq,Sequence *S, char *lib_file, Constraint_list *CL);
55 #define is_a_seq_file(file) (!is_matrix(file) && !is_matrix(file+1) && !is_method (file) && !is_method (file+1) &&(check_file_exists(file) || check_file_exists(file+1)))
56 static int NO_METHODS_IN_CL;
57 int batch_main ( int argc, char **argv);
58 int main (int argc, char *argv[])
62 if (argc>=2 && strcmp (argv[1], "-batch")==0)
65 list=file2lines (argv[2]);
66 for (a=1; a<atoi (list[0]); a++)
69 com=string2list (list[a]);
70 r=batch_main (atoi (com[0])-1, com+1);
76 r=batch_main (argc, argv);
80 int batch_main ( int argc, char **argv)
92 Alignment *A=NULL, *EA=NULL;
103 int check_configuration;
108 char *t_coffee_defaults;
109 int t_coffee_defaults_flag;
120 int nseq_for_quadruplet;
121 char **seq_name_for_quadruplet;
139 char **template_file_list;
142 char **template_mode_list;
147 int remove_template_file;
149 char **profile_template_file_list;
150 int n_profile_template_file;
154 int pdb_start, pdb_end;
171 int cosmetic_penalty,gop,f_gop, gep,f_gep, nomatch;
178 char *distance_matrix_mode;
179 char *distance_matrix_sim_mode;
185 char **out_aln_format;
186 int n_out_aln_format;
191 char *profile_comparison;
207 char *output_res_num;
217 char *method_evaluate_mode;
223 char *clean_evaluate_mode;
224 /*Profile Alignment*/
233 char **method_limits;
236 char **aln_file_list;
239 char **lib_file_list;
248 /*Domain Parameters*/
253 int domain_interactive;
254 /* extended matrix analysis*/
255 int do_extended_matrix;
256 /*Action Parameters*/
263 /*Thread parameters*/
273 char *prot_blast_server;
274 char *pdb_blast_server;
283 char *dna_blast_server;
300 char *align_pdb_param_file;
301 char *align_pdb_hasch_mode;
313 int split_nseq_thres;
314 int split_score_thres;
315 char split_name[1000];
316 char split_format[1000];
317 Alignment *SPLIT_ALN;
319 int check_pdb_status;
322 Sequence *trim_subS=NULL;
323 Sequence *trim_S=NULL;
324 Sequence *SEQ_TO_KEEP=NULL;
326 char trim_format[1000];
330 char **special_mode_list;
332 char **special_mode_list1;
334 char **special_mode_list2;
338 char *dpa_master_aln;
342 int dpa_keep_tmpfile;
352 char *prune_lib_mode;
357 int run_local_script;
364 char **overaln_param;
365 char n_overaln_param;
366 char * exon_boundaries;
374 int overaln_threshold;
378 argv=standard_initialisation_start (argv, &argc);
379 set_string_variable ("t_coffee", argv[0]);
381 /*Running other programs via T-Coffee*/
382 if (argc>=3 && strm (argv[1], "-other_pg"))
384 standard_initialisation_start (NULL,NULL);
385 return run_other_pg (argc-2, argv+2);
388 /*PARAMETER PROTOTYPE: READ PARAMETER FILE */
393 /*Name*/ "-no_error_report" ,\
396 /*OPTIONAL?*/ OPTIONAL ,\
398 /*DOC*/ "Limit the maximum memory usage (in Megabytes). 0: no limit" ,\
399 /*Parameter*/ &no_error_report ,\
402 /*Min_value*/ "any" ,\
403 /*Max Value*/ "any" \
406 /*PARAMETER PROTOTYPE: READ PARAMETER FILE */
407 declare_name (parameters);
412 /*Name*/ "-parameters" ,\
415 /*OPTIONAL?*/ OPTIONAL ,\
417 /*DOC*/ "get bottom parameters" ,\
418 /*Parameter*/ ¶meters ,\
421 /*Min_value*/ "any" ,\
422 /*Max Value*/ "any" \
426 special_mode_list1=declare_char (100, STRING);
428 n_special_mode1=get_cl_param( \
435 /*OPTIONAL?*/ OPTIONAL ,\
437 /*DOC*/ "specifies a special mode: genome, quickaln, dali, 3dcoffee" ,\
438 /*Parameter*/ special_mode_list1 ,\
439 /*Def 1*/ "unspecified" ,\
440 /*Def 2*/ "HARD_CODED" ,\
441 /*Min_value*/ "any" ,\
442 /*Max Value*/ "any" \
446 special_mode_list2=declare_char (100, STRING);
447 n_special_mode2=get_cl_param(\
451 /*Name*/ "-special_mode" ,\
454 /*OPTIONAL?*/ OPTIONAL ,\
456 /*DOC*/ "[DEPRECATED ** -special_mode is deprected use -mode instead]" ,\
457 /*Parameter*/ special_mode_list2 ,\
458 /*Def 1*/ "unspecified" ,\
459 /*Def 2*/ "HARD_CODED" ,\
460 /*Min_value*/ "any" ,\
461 /*Max Value*/ "any" \
464 special_mode_list=declare_char (n_special_mode1+n_special_mode2, STRING);
466 for (a=0; a<n_special_mode1; a++)
467 if (!strm (special_mode_list1[a], "unspecified"))sprintf ( special_mode_list[n_special_mode++], "%s", special_mode_list1[a]);
468 for (a=0; a<n_special_mode2; a++)
469 if (!strm (special_mode_list2[a], "unspecified"))sprintf ( special_mode_list[n_special_mode++], "%s", special_mode_list2[a]);
470 free_char (special_mode_list1, -1);
471 free_char (special_mode_list2, -1);
473 declare_name (t_coffee_defaults);
478 /*Name*/ "-t_coffee_defaults" ,\
479 /*Flag*/ &t_coffee_defaults_flag ,\
481 /*OPTIONAL?*/ OPTIONAL ,\
483 /*DOC*/ "get top parameters" ,\
484 /*Parameter*/ &t_coffee_defaults ,\
487 /*Min_value*/ "any" ,\
488 /*Max Value*/ "any" \
490 /*PARAMETER PROTOTYPE: -type_only: must stay here: needed by special_mode */
495 /*Name*/ "-type_only" ,\
496 /*Flag*/ &type_only ,\
498 /*OPTIONAL?*/ OPTIONAL ,\
500 /*DOC*/ "exit after checking the type and returning it to the stdout",\
501 /*Parameter*/ &type_only ,\
504 /*Min_value*/ "any" ,\
505 /*Max Value*/ "any" \
507 /*PARAMETER PROTOTYPE: CHECK_TYPE */
512 /*Name*/ "-check_type" , \
513 /*Flag*/ &check_type , \
515 /*OPTIONAL?*/ OPTIONAL , \
517 /*DOC*/ "Make sure that -type and the real type of the sequences agree" , \
518 /*Parameter*/ &check_type , \
521 /*Min_value*/ "any" , \
522 /*Max Value*/ "any" \
524 /*PARAMETER PROTOTYPE: INFILE */
531 /*Flag*/ &garbage , \
533 /*OPTIONAL?*/ OPTIONAL , \
535 /*DOC*/ "protein or dna. Automatically set, but can be forced with this flag" , \
536 /*Parameter*/ &type , \
539 /*Min_value*/ "any" , \
540 /*Max Value*/ "any" \
544 /* extra>prompt>special>parameters>defaults*/
545 argv=break_list ( argv, &argc, "=;, \n");
546 argv=merge_list ( argv, &argc);
547 if (argc>1 && argv[1][0]!='-')argv=push_string ("-seq ", argv, &argc, 1);
549 if ( name_is_in_list ("-method",argv, argc,100)==-1)
554 if (t_coffee_defaults_flag)
558 pname=getenv ( "TCOFFEE_DEFAULTS");
560 if (check_file_exists ( t_coffee_defaults))pname=t_coffee_defaults;
561 else if ( getenv ( "TCOFFEE_DEFAULTS"))
563 pname=getenv ( "TCOFFEE_DEFAULTS");
564 if (check_file_exists(pname));
569 declare_name(pname);sprintf (pname, "%s/.t_coffee_defaults",getenv ( "HOME") );
570 if (!check_file_exists (pname)){vfree(pname);pname=NULL;}
575 argv=push_string (file2string(pname), argv, &argc, 1);
576 t_coffee_defaults=pname;
580 t_coffee_defaults=NULL;
584 if ( parameters && parameters[0])argv=push_string (file2string (parameters), argv, &argc, 1);
587 if (n_special_mode && !type_only)
591 declare_name(lseq_type);
592 if (type && !strm (type, ""))
593 sprintf (lseq_type,"%s",type);
595 sprintf (lseq_type,"%s",get_seq_type_from_cl (argc, argv));
597 for ( a=0; a< n_special_mode; a++)
601 special_mode=special_mode_list[a];
603 store_mode (special_mode);
606 if (special_mode && !special_mode[0]);
607 else if ( strm (special_mode, "regular") || strm (special_mode, "regular_fast")|| strm (special_mode, "default"))new_arg=get_defaults (NULL,lseq_type);
608 else if ( strm (special_mode, "genome"))new_arg=get_genome_defaults(NULL,lseq_type);
609 else if ( strm (special_mode, "quickaln"))new_arg=get_very_fast_defaults(NULL,lseq_type);
610 else if ( strm (special_mode, "dali"))new_arg=get_dali_defaults(NULL,lseq_type);
611 else if ( strm (special_mode, "evaluate"))new_arg=get_evaluate_defaults(NULL,lseq_type);
612 else if ( strm (special_mode, "precomputed"))new_arg=get_precomputed_defaults(NULL,lseq_type);
613 else if ( strm (special_mode, "3dcoffee"))new_arg=get_3dcoffee_defaults(NULL,lseq_type);
614 else if ( strm (special_mode, "expresso"))new_arg=get_expresso_defaults(NULL,lseq_type);
615 else if ( strm (special_mode, "repeats"))new_arg=get_repeat_defaults(NULL,lseq_type);
616 else if ( strm (special_mode, "psicoffee"))new_arg=get_psicoffee_defaults(NULL,lseq_type);
618 else if ( strm (special_mode, "accurate") || strm (special_mode, "accurate_slow") || strm (special_mode, "psicoffee_expresso"))new_arg=get_accurate_defaults(NULL, lseq_type);
619 else if ( strm (special_mode, "accurate4DNA"))new_arg=get_accurate4DNA_defaults(NULL,lseq_type);
620 else if ( strm (special_mode, "accurate4RNA"))new_arg=get_accurate4RNA_defaults(NULL,lseq_type);
621 else if ( strm (special_mode, "best4RNA"))new_arg=get_best4RNA_defaults(NULL,lseq_type);
622 else if ( strm (special_mode, "accurate4PROTEIN"))new_arg=get_accurate4PROTEIN_defaults(NULL,lseq_type);
624 else if ( strm (special_mode, "low_memory") || strm (special_mode, "memory"))new_arg=get_low_memory_defaults(NULL,lseq_type);
627 else if ( strm (special_mode, "dna"))new_arg=get_dna_defaults(NULL,lseq_type);
628 else if ( strm (special_mode, "cdna"))new_arg=get_dna_defaults(NULL,lseq_type);
629 else if ( strm (special_mode, "protein"))new_arg=get_low_memory_defaults(NULL,lseq_type);
630 else if ( strm (special_mode, "mcoffee"))new_arg=get_mcoffee_defaults(NULL,lseq_type);
631 else if ( strm (special_mode, "dmcoffee"))new_arg=get_dmcoffee_defaults(NULL,lseq_type);
632 else if ( strm (special_mode, "fmcoffee"))new_arg=get_fmcoffee_defaults(NULL,lseq_type);
634 else if ( strm (special_mode, "rcoffee_consan"))new_arg=get_rcoffee_consan_defaults(NULL,lseq_type);
635 else if ( strm (special_mode, "rmcoffee") ||strm (special_mode, "mrcoffee") )new_arg=get_rmcoffee_defaults(NULL,lseq_type);
636 else if ( strm (special_mode, "rcoffee"))new_arg=get_rcoffee_defaults(NULL,lseq_type);
638 else if ( strm (special_mode, "rcoffee_slow_accurate"))new_arg=get_rcoffee_consan_defaults(NULL,lseq_type);
639 else if ( strm (special_mode, "rcoffee_fast_approximate"))new_arg=get_rmcoffee_defaults(NULL,lseq_type);
640 else if ( strm (special_mode, "t_coffee"))new_arg=get_t_coffee_defaults(NULL,lseq_type);
643 else if ( strm (special_mode, "unspecified"));
646 fprintf ( stderr, "\nERROR: special_mode %s is unknown [FATAL:%s]\n",special_mode, PROGRAM);
647 myexit (EXIT_FAILURE);
650 if (new_arg)argv=push_string (new_arg, argv, &argc, 1);
654 if ( getenv ("TCOFFEE_EXTRA_PARAM"))argv=push_string (getenv ("TCOFFEE_EXTRA_PARAM"), argv, &argc, argc);
657 argv=break_list ( argv, &argc, "=;, \n");
658 argv=merge_list ( argv, &argc);
659 /*check_cl4t_coffee ( argc, argv); */
662 /*PARAMETER PROTOTYPE: VERSION */
667 /*Name*/ "-version" ,\
668 /*Flag*/ &do_version ,\
670 /*OPTIONAL?*/ OPTIONAL ,\
672 /*DOC*/ "forces the program to output the version number and exit" ,\
673 /*Parameter*/ &do_version ,\
681 /*PARAMETER PROTOTYPE: DO EVALUATE */
687 /*Flag*/ &do_evaluate ,\
689 /*OPTIONAL?*/ OPTIONAL ,\
691 /*DOC*/ "DEPRECATED: use -special_mode evaluate instead " ,\
692 /*Parameter*/ &do_evaluate ,\
700 /*PARAMETER PROTOTYPE: DO EVALUATE */
705 /*Name*/ "-evaluate" ,\
706 /*Flag*/ &do_evaluate ,\
708 /*OPTIONAL?*/ OPTIONAL ,\
710 /*DOC*/ "Use -special_mode evaluate for a default behavior " ,\
711 /*Parameter*/ &do_evaluate ,\
718 /*PARAMETER PROTOTYPE: DO FORMAT */
723 /*Name*/ "-convert" ,\
724 /*Flag*/ &do_convert ,\
726 /*OPTIONAL?*/ OPTIONAL ,\
728 /*DOC*/ "forces the program to make a conversion" ,\
729 /*Parameter*/ &do_convert ,\
737 /*PARAMETER PROTOTYPE*/
739 declare_name (se_name);
747 /*OPTIONAL?*/ OPTIONAL ,\
749 /*DOC*/ "Defines the file in which the log output is written" ,\
750 /*Parameter*/ &se_name ,\
751 /*Def 1*/ "stderr" ,\
752 /*Def 2*/ "/dev/null" ,\
753 /*Min_value*/ "any" ,\
754 /*Max Value*/ "any" \
756 if (type_only==1)sprintf ( se_name, "/dev/null");
758 /*PARAMETER PROTOTYPE: DO FORMAT */
763 /*Name*/ "-check_configuration" ,\
764 /*Flag*/ &check_configuration ,\
766 /*OPTIONAL?*/ OPTIONAL ,\
768 /*DOC*/ "checks that the required programs are installed" ,\
769 /*Parameter*/ &check_configuration ,\
775 /*PARAMETER PROTOTYPE: UPDATE */
780 /*Name*/ "-update" ,\
783 /*OPTIONAL?*/ OPTIONAL ,\
785 /*DOC*/ "checks the existence of an updated version" ,\
786 /*Parameter*/ &update ,\
795 if ( check_configuration)
798 check_configuration4program();
804 myexit (check_for_update(DISTRIBUTION_ADDRESS));
808 fprintf ( stdout, "PROGRAM: %s (%s)\n",PROGRAM,VERSION);
813 le=vfopen ( se_name, "w");
814 fprintf ( le, "\nPROGRAM: %s (%s)\n",PROGRAM,VERSION);
816 /*PARAMETER PROTOTYPE: RUN NAME*/
817 declare_name (full_log);
822 /*Name*/ "-full_log" ,\
825 /*OPTIONAL?*/ OPTIONAL ,\
827 /*DOC*/ "Sets the prefix of all the output files" ,\
828 /*Parameter*/ &full_log ,\
830 /*Def 2*/ "full_log" ,\
831 /*Min_value*/ "any" ,\
832 /*Max Value*/ "any" \
835 /*PARAMETER PROTOTYPE: RUN NAME*/
836 declare_name (run_name);
841 /*Name*/ "-run_name" ,\
844 /*OPTIONAL?*/ OPTIONAL ,\
846 /*DOC*/ "Sets the prefix of all the output files" ,\
847 /*Parameter*/ &run_name ,\
850 /*Min_value*/ "any" ,\
851 /*Max Value*/ "any" \
854 /*PARAMETER PROTOTYPE: MEM MODE*/
855 declare_name(mem_mode);
860 /*Name*/ "-mem_mode" ,\
863 /*OPTIONAL?*/ OPTIONAL ,\
865 /*DOC*/ "Deprecated" ,\
866 /*Parameter*/ &mem_mode ,\
869 /*Min_value*/ "any" ,\
870 /*Max Value*/ "any" \
873 /*PARAMETER PROTOTYPE: EXTEND */
878 /*Name*/ "-extend" ,\
879 /*Flag*/ &do_extend ,\
881 /*OPTIONAL?*/ OPTIONAL ,\
883 /*DOC*/ "Do Library Extention On the Fly" ,\
884 /*Parameter*/ &do_extend ,\
887 /*Min_value*/ "any" ,\
888 /*Max Value*/ "any" \
890 /*PARAMETER PROTOTYPE: EXTEND */
891 declare_name (extend_mode);
896 /*Name*/ "-extend_mode" ,\
899 /*OPTIONAL?*/ OPTIONAL ,\
901 /*DOC*/ "Library extension mode" ,\
902 /*Parameter*/ &extend_mode ,\
903 /*Def 1*/ "very_fast_triplet" ,\
905 /*Min_value*/ "any" ,\
906 /*Max Value*/ "any" \
908 /*PARAMETER PROTOTYPE: EXTEND */
913 /*Name*/ "-max_n_pair" ,\
916 /*OPTIONAL?*/ OPTIONAL ,\
918 /*DOC*/ "Indicates the Number of Pairs to Compare when making prf Vs prf. 0<=>every pair " ,\
919 /*Parameter*/ &max_n_pair ,\
922 /*Min_value*/ "any" ,\
923 /*Max Value*/ "any" \
926 /*PARAMETER PROTOTYPE: SEQUENCES TO EXTEND */
927 seq_name_for_quadruplet=declare_char ( 200, STRING);
928 nseq_for_quadruplet=get_cl_param(\
932 /*Name*/ "-seq_name_for_quadruplet" ,\
935 /*OPTIONAL?*/ OPTIONAL ,\
937 /*DOC*/ "Indicates which sequence must be used to compute quadruplets" ,\
938 /*Parameter*/ seq_name_for_quadruplet ,\
941 /*Min_value*/ "any" ,\
942 /*Max Value*/ "any" \
944 /*PARAMETER PROTOTYPE: COMPACT */
945 declare_name (compact_mode);
950 /*Name*/ "-compact" ,\
951 /*Flag*/ &do_compact ,\
953 /*OPTIONAL?*/ OPTIONAL ,\
955 /*DOC*/ "Deprecated" ,\
956 /*Parameter*/ &compact_mode ,\
957 /*Def 1*/ "default" ,\
958 /*Def 2*/ "default" ,\
964 /*PARAMETER PROTOTYPE: CLEAN*/
965 declare_name ( clean_mode);
971 /*Flag*/ &do_clean ,\
973 /*OPTIONAL?*/ OPTIONAL ,\
975 /*DOC*/ "Deprecated" ,\
976 /*Parameter*/ &clean_mode ,\
978 /*Def 2*/ "shadow" ,\
979 /*Min_value*/ "any" ,\
980 /*Max Value*/ "any" \
983 /*PARAMETER PROTOTYPE: DO SELF */
988 /*Name*/ "-do_self" ,\
991 /*OPTIONAL?*/ OPTIONAL ,\
993 /*DOC*/ "Make self extension. Used by Mocca" ,\
994 /*Parameter*/ &do_self ,\
1001 /*PARAMETER PROTOTYPE: DO NORMALISE */
1006 /*Name*/ "-do_normalise" ,\
1007 /*Flag*/ &garbage ,\
1009 /*OPTIONAL?*/ OPTIONAL ,\
1011 /*DOC*/ "Normalisation factor when computing scores" ,\
1012 /*Parameter*/ &do_normalise ,\
1015 /*Min_value*/ "-10000" ,\
1016 /*Max Value*/ "10000" \
1018 /*PARAMETER PROTOTYPE: IN */
1019 template_file_list=declare_char (100, STRING);
1020 n_template_file=get_cl_param( \
1024 /*Name*/ "-template_file" ,\
1025 /*Flag*/ &garbage ,\
1027 /*OPTIONAL?*/ OPTIONAL ,\
1028 /*MAX Nval*/ 1000 ,\
1029 /*DOC*/ "List of templates file for the sequences",\
1030 /*Parameter*/ template_file_list , \
1032 /*Def 2*/ "stdin" ,\
1033 /*Min_value*/ "any" ,\
1034 /*Max Value*/ "any" \
1036 /*PARAMETER PROTOTYPE: IN */
1037 template_mode_list=declare_char (100, STRING);
1038 n_template_mode=get_cl_param( \
1042 /*Name*/ "-template_mode" ,\
1043 /*Flag*/ &garbage ,\
1045 /*OPTIONAL?*/ OPTIONAL ,\
1046 /*MAX Nval*/ 1000 ,\
1047 /*DOC*/ "List of template procedures",\
1048 /*Parameter*/ template_mode_list , \
1050 /*Def 2*/ "stdin" ,\
1051 /*Min_value*/ "any" ,\
1052 /*Max Value*/ "any" \
1054 for (a=0; a<n_template_mode; a++)
1056 sprintf (template_file_list[n_template_file++], "%s", template_mode_list [a]);
1058 /*PARAMETER PROTOTYPE: remove_template_file*/
1064 /*Name*/ "-remove_template_file" ,\
1065 /*Flag*/ &remove_template_file ,\
1067 /*OPTIONAL?*/ OPTIONAL ,\
1069 /*DOC*/ "Remove all the template files: 0 keep all, 1: only remove the template files 2: remove template files AND template lists " ,\
1070 /*Parameter*/ &remove_template_file ,\
1073 /*Min_value*/ "any" ,\
1074 /*Max Value*/ "any" \
1076 set_int_variable ("remove_template_file", remove_template_file);
1078 /*PARAMETER PROTOTYPE: IN */
1079 profile_template_file_list=declare_char (100, STRING);
1080 n_profile_template_file=get_cl_param( \
1084 /*Name*/ "-profile_template_file" ,\
1085 /*Flag*/ &garbage ,\
1087 /*OPTIONAL?*/ OPTIONAL ,\
1088 /*MAX Nval*/ 1000 ,\
1089 /*DOC*/ "List of templates files asscoaciated with profiles",\
1090 /*Parameter*/ profile_template_file_list , \
1092 /*Def 2*/ "stdin" ,\
1093 /*Min_value*/ "any" ,\
1094 /*Max Value*/ "any" \
1097 /*PARAMETER PROTOTYPE: IN */
1098 list_file=declare_char (2000, STRING);
1099 n_list=get_cl_param(\
1104 /*Flag*/ &garbage ,\
1106 /*OPTIONAL?*/ OPTIONAL ,\
1107 /*MAX Nval*/ 2000 ,\
1108 /*DOC*/ "Reads the Ssequences, Mmethods, Llibraries,Xmatrices,Rprofiles,Pstructures,AAlignments" ,\
1109 /*Parameter*/ list_file ,\
1111 /*Def 2*/ "stdin" ,\
1112 /*Min_value*/ "any" ,\
1113 /*Max Value*/ "any" \
1117 /*PARAMETER PROTOTYPE: IN */
1118 seq_list=declare_char (1000, STRING);
1119 n_seq_list=get_cl_param( \
1124 /*Flag*/ &garbage , \
1126 /*OPTIONAL?*/ OPTIONAL , \
1127 /*MAX Nval*/ 1000 , \
1128 /*DOC*/ "List of sequences in any acceptable format", \
1129 /*Parameter*/ seq_list , \
1131 /*Def 2*/ "stdin" , \
1132 /*Min_value*/ "any" , \
1133 /*Max Value*/ "any" \
1135 aln_file_list=declare_char (1000, STRING);
1136 n_aln_file_list=get_cl_param( \
1141 /*Flag*/ &garbage , \
1143 /*OPTIONAL?*/ OPTIONAL , \
1144 /*MAX Nval*/ 1000 , \
1145 /*DOC*/ "List of sequences in any acceptable format", \
1146 /*Parameter*/ aln_file_list , \
1148 /*Def 2*/ "stdin" , \
1149 /*Min_value*/ "any" , \
1150 /*Max Value*/ "any" \
1152 method_limits=declare_char (1000, STRING);
1153 n_method_limits=get_cl_param( \
1157 /*Name*/ "-method_limits" , \
1158 /*Flag*/ &garbage , \
1160 /*OPTIONAL?*/ OPTIONAL , \
1161 /*MAX Nval*/ 1000 , \
1162 /*DOC*/ "List of limits for selected methods: method maxnseq maxlen (-1 = nolimit)", \
1163 /*Parameter*/ method_limits , \
1166 /*Min_value*/ "any" , \
1167 /*Max Value*/ "any" \
1169 method_list=declare_char (1000, STRING);
1170 n_method_list=get_cl_param( \
1174 /*Name*/ "-method" , \
1175 /*Flag*/ &garbage , \
1177 /*OPTIONAL?*/ OPTIONAL , \
1178 /*MAX Nval*/ 1000 , \
1179 /*DOC*/ "List of sequences in any acceptable format", \
1180 /*Parameter*/ method_list , \
1183 /*Min_value*/ "any" , \
1184 /*Max Value*/ "any" \
1186 lib_file_list=declare_char (1000, STRING);
1187 n_lib_file_list=get_cl_param( \
1192 /*Flag*/ &garbage , \
1194 /*OPTIONAL?*/ OPTIONAL , \
1195 /*MAX Nval*/ 1000 , \
1196 /*DOC*/ "List of sequences in any acceptable format", \
1197 /*Parameter*/ lib_file_list , \
1199 /*Def 2*/ "stdin" , \
1200 /*Min_value*/ "any" , \
1201 /*Max Value*/ "any" \
1203 profile_list=declare_char ( 2000, STRING);
1204 n_profile_list=get_cl_param( \
1208 /*Name*/ "-profile" ,\
1209 /*Flag*/ &garbage ,\
1211 /*OPTIONAL?*/ OPTIONAL ,\
1212 /*MAX Nval*/ 2000 ,\
1213 /*DOC*/ "Input one or many MSA that will be treated as profiles" ,\
1214 /*Parameter*/ profile_list ,\
1217 /*Min_value*/ "any" ,\
1218 /*Max Value*/ "any" \
1220 declare_name (profile1);
1225 /*Name*/ "-profile1" ,\
1226 /*Flag*/ &garbage ,\
1228 /*OPTIONAL?*/ OPTIONAL ,\
1230 /*DOC*/ "Input one profile (ClustalW option)" ,\
1231 /*Parameter*/ &profile1 ,\
1234 /*Min_value*/ "any" ,\
1235 /*Max Value*/ "any" \
1237 declare_name (profile2);
1242 /*Name*/ "-profile2" ,\
1243 /*Flag*/ &garbage ,\
1245 /*OPTIONAL?*/ OPTIONAL ,\
1247 /*DOC*/ "Input a profile (ClustalW option)" ,\
1248 /*Parameter*/ &profile2 ,\
1251 /*Min_value*/ "any" ,\
1252 /*Max Value*/ "any" \
1255 pdb_list=declare_char ( 200, STRING);
1256 n_pdb=get_cl_param(\
1261 /*Flag*/ &garbage ,\
1263 /*OPTIONAL?*/ OPTIONAL ,\
1265 /*DOC*/ "Reads/fetch a pdb file: PDBID(PDB_CHAIN)[opt] (FIRST,LAST)[opt]," ,\
1266 /*Parameter*/ pdb_list ,\
1269 /*Min_value*/ "any" ,\
1270 /*Max Value*/ "any" \
1273 /*PARAMETER PROTOTYPE: OUT_LIB */
1279 /*Name*/ "-relax_lib" ,\
1280 /*Flag*/ &garbage ,\
1282 /*OPTIONAL?*/ OPTIONAL ,\
1284 /*DOC*/ "self extend the library, without adding new positions", \
1285 /*Parameter*/&relax_lib ,\
1288 /*Min_value*/ "any" ,\
1289 /*Max Value*/ "any" \
1291 /*PARAMETER PROTOTYPE: OUT_LIB */
1297 /*Name*/ "-filter_lib" ,\
1298 /*Flag*/ &garbage ,\
1300 /*OPTIONAL?*/ OPTIONAL ,\
1302 /*DOC*/ "Removes from the library every value below the threshold",\
1303 /*Parameter*/&filter_lib ,\
1306 /*Min_value*/ "any" ,\
1307 /*Max Value*/ "any" \
1309 /*PARAMETER PROTOTYPE: SHRINK_LIB */
1315 /*Name*/ "-shrink_lib" ,\
1316 /*Flag*/ &garbage ,\
1318 /*OPTIONAL?*/ OPTIONAL ,\
1320 /*DOC*/ "Runks linked_pairwise on the lib to remove every useless diagonal" ,\
1321 /*Parameter*/&shrink_lib ,\
1324 /*Min_value*/ "any" ,\
1325 /*Max Value*/ "any" \
1327 /*PARAMETER PROTOTYPE: OUT_LIB */
1328 declare_name (out_lib);
1333 /*Name*/ "-out_lib" ,\
1334 /*Flag*/ &garbage ,\
1336 /*OPTIONAL?*/ OPTIONAL ,\
1338 /*DOC*/ "Prompts the program to write the computed library file" ,\
1339 /*Parameter*/&out_lib ,\
1341 /*Def 2*/ "default" ,\
1342 /*Min_value*/ "any" ,\
1343 /*Max Value*/ "any" \
1345 /*PARAMETER PROTOTYPE: OUT_LIB_MODE */
1346 declare_name (out_lib_mode);
1351 /*Name*/ "-out_lib_mode" ,\
1352 /*Flag*/ &garbage ,\
1354 /*OPTIONAL?*/ OPTIONAL ,\
1356 /*DOC*/ "Save the primary or the extended library:[primary|extende]extended_[pair|lib]_[raw|pc]" ,\
1357 /*Parameter*/&out_lib_mode ,\
1358 /*Def 1*/ "primary" ,\
1359 /*Def 2*/ "extended",\
1360 /*Min_value*/ "any" ,\
1361 /*Max Value*/ "any" \
1363 /*PARAMETER PROTOTYPE: LIB_ONLY */
1369 /*Name*/ "-lib_only" ,\
1370 /*Flag*/ &garbage ,\
1372 /*OPTIONAL?*/ OPTIONAL ,\
1374 /*DOC*/ "Only Compute the library",\
1375 /*Parameter*/&lib_only ,\
1378 /*Min_value*/ "any" ,\
1379 /*Max Value*/ "any" \
1382 /*PARAMETER PROTOTYPE: OUT_LIB */
1383 declare_name (outseqweight);
1388 /*Name*/ "-outseqweight" ,\
1389 /*Flag*/ &garbage ,\
1391 /*OPTIONAL?*/ OPTIONAL ,\
1393 /*DOC*/ "Prompts the program to write the sequuence weight values" ,\
1394 /*Parameter*/&outseqweight ,\
1396 /*Def 2*/ "default" ,\
1397 /*Min_value*/ "any" ,\
1398 /*Max Value*/ "any" \
1400 /*PARAMETER PROTOTYPE: DPA */
1408 /*OPTIONAL?*/ OPTIONAL ,\
1410 /*DOC*/ "Use DPA mode" ,\
1411 /*Parameter*/ &dpa ,\
1414 /*Min_value*/ "any" ,\
1415 /*Max Value*/ "any" \
1418 /*PARAMETER PROTOTYPE: SEQ TO ALIGN */
1419 declare_name (seq_source);
1424 /*Name*/ "-seq_source",\
1425 /*Flag*/ &garbage ,\
1427 /*OPTIONAL?*/ OPTIONAL ,\
1429 /*DOC*/ "Indicates the files that will be used as sequence sources, important for dpa. With the default mode alignments must be provided with the Sflag as well as tye Aflag if they contribute novel sequences",\
1430 /*Parameter*/ &seq_source ,\
1433 /*Min_value*/ "any" ,\
1434 /*Max Value*/ "any" \
1437 /*PARAMETER PROTOTYPE: COSMETIC PENALTY */
1442 /*Name*/ "-cosmetic_penalty" ,\
1443 /*Flag*/ &garbage ,\
1445 /*OPTIONAL?*/ OPTIONAL ,\
1447 /*DOC*/ "A very low Gap Opening Penalty.It only affects the non stable portions of the alignmnent.Negative values penalize gaps, positive values reward them" ,\
1448 /*Parameter*/ &cosmetic_penalty ,\
1451 /*Min_value*/ "any" ,\
1452 /*Max Value*/ "any" \
1454 /*PARAMETER PROTOTYPE: GAPOPEN */
1459 /*Name*/ "-gapopen" ,\
1460 /*Flag*/ &garbage ,\
1462 /*OPTIONAL?*/ OPTIONAL ,\
1464 /*DOC*/ "Gap opening penalty. Must be negative, best matches get a score of 1000" ,\
1465 /*Parameter*/ &gop ,\
1468 /*Min_value*/ "any" ,\
1469 /*Max Value*/ "any" \
1472 /*PARAMETER PROTOTYPE: GAPEXT */
1477 /*Name*/ "-gapext" ,\
1478 /*Flag*/ &garbage ,\
1480 /*OPTIONAL?*/ OPTIONAL ,\
1482 /*DOC*/ "Gap Extension Penalty. Positive values give rewards to gaps and prevent the alignment of unrelated segments" ,\
1483 /*Parameter*/ &gep ,\
1486 /*Min_value*/ "any" ,\
1487 /*Max Value*/ "any" \
1490 /*PARAMETER PROTOTYPE: F_GAPOPEN */
1495 /*Name*/ "-fgapopen" ,\
1496 /*Flag*/ &garbage ,\
1498 /*OPTIONAL?*/ OPTIONAL ,\
1500 /*DOC*/ "Deprecated" ,\
1501 /*Parameter*/ &f_gop ,\
1504 /*Min_value*/ "any" ,\
1505 /*Max Value*/ "any" \
1507 /*PARAMETER PROTOTYPE: F_GAPEXT */
1512 /*Name*/ "-fgapext" ,\
1513 /*Flag*/ &garbage ,\
1515 /*OPTIONAL?*/ OPTIONAL ,\
1517 /*DOC*/ "Deprecated" ,\
1518 /*Parameter*/ &f_gep ,\
1521 /*Min_value*/ "any" ,\
1522 /*Max Value*/ "any" \
1524 /*PARAMETER PROTOTYPE: NEW_TREE */
1529 /*Name*/ "-nomatch" ,\
1530 /*Flag*/ &garbage ,\
1532 /*OPTIONAL?*/ OPTIONAL ,\
1534 /*DOC*/ "Deprecated" ,\
1535 /*Parameter*/ &nomatch ,\
1538 /*Min_value*/ "any" ,\
1539 /*Max Value*/ "any" \
1541 declare_name ( tree_file);
1546 /*Name*/ "-newtree" ,\
1547 /*Flag*/ &garbage ,\
1549 /*OPTIONAL?*/ OPTIONAL ,\
1551 /*DOC*/ "Name of the output guide tree" ,\
1552 /*Parameter*/&tree_file ,\
1553 /*Def 1*/ "default" ,\
1555 /*Min_value*/ "any" ,\
1556 /*Max Value*/ "any" \
1558 declare_name ( ph_tree_file);
1564 /*Flag*/ &garbage ,\
1566 /*OPTIONAL?*/ OPTIONAL ,\
1568 /*DOC*/ "Name of the output guide tree" ,\
1569 /*Parameter*/&ph_tree_file ,\
1571 /*Def 2*/ "default" ,\
1572 /*Min_value*/ "any" ,\
1573 /*Max Value*/ "any" \
1576 /*PARAMETER PROTOTYPE: USETREE */
1577 declare_name ( use_tree);
1582 /*Name*/ "-usetree",\
1583 /*Flag*/ &garbage ,\
1585 /*OPTIONAL?*/ OPTIONAL ,\
1587 /*DOC*/ "Use an existing guide tree" ,\
1588 /*Parameter*/ &use_tree ,\
1591 /*Min_value*/ "any" ,\
1592 /*Max Value*/ "any" \
1594 /*PARAMETER PROTOTYPE: */
1595 declare_name ( tree_mode);
1600 /*Name*/ "-tree_mode" ,\
1601 /*Flag*/ &garbage ,\
1603 /*OPTIONAL?*/ OPTIONAL ,\
1605 /*DOC*/ "nj, upgma, cwph",\
1606 /*Parameter*/ &tree_mode ,\
1609 /*Min_value*/ "1" ,\
1612 /*PARAMETER PROTOTYPE: OUT_LIB */
1613 declare_name ( distance_matrix_mode);
1618 /*Name*/ "-distance_matrix_mode" ,\
1619 /*Flag*/ &garbage ,\
1621 /*OPTIONAL?*/ OPTIONAL ,\
1623 /*DOC*/ "Computation of the distances for the tree: slow, fast, very_fast, ktup" ,\
1624 /*Parameter*/ &distance_matrix_mode ,\
1626 /*Def 2*/ "idscore" ,\
1627 /*Min_value*/ "any" ,\
1628 /*Max Value*/ "any" \
1630 /*PARAMETER PROTOTYPE: OUT_LIB */
1631 declare_name ( distance_matrix_sim_mode);
1636 /*Name*/ "-distance_matrix_sim_mode" ,\
1637 /*Flag*/ &garbage ,\
1639 /*OPTIONAL?*/ OPTIONAL ,\
1641 /*DOC*/ "Choice of the distance measure: <mat>_sim1, _sim2, _sim3, _cov, _gap" ,\
1642 /*Parameter*/ &distance_matrix_sim_mode ,\
1643 /*Def 1*/ "idmat_sim1" ,\
1644 /*Def 2*/ "idmat_sim1" ,\
1645 /*Min_value*/ "any" ,\
1646 /*Max Value*/ "any" \
1648 /*PARAMETER PROTOTYPE: OUT_LIB */
1653 /*Name*/ "-quicktree" ,\
1654 /*Flag*/ &quicktree ,\
1656 /*OPTIONAL?*/ OPTIONAL ,\
1658 /*DOC*/ "Use distance_matrix_mode=very_fast" ,\
1659 /*Parameter*/ &quicktree ,\
1662 /*Min_value*/ "any" ,\
1663 /*Max Value*/ "any" \
1665 if ( quicktree)sprintf ( distance_matrix_mode, "very_fast");
1666 /*PARAMETER PROTOTYPE: OUTFILE */
1667 declare_name ( out_aln);
1668 tot_out_aln=declare_char (200, STRING);
1673 /*Name*/ "-outfile" ,\
1674 /*Flag*/ &garbage ,\
1676 /*OPTIONAL?*/ OPTIONAL ,\
1678 /*DOC*/ "Name of the output alignment" ,\
1679 /*Parameter*/ &out_aln ,\
1680 /*Def 1*/ "default" ,\
1682 /*Min_value*/ "any" ,\
1683 /*Max Value*/ "any" \
1686 /*PARAMETER PROTOTYPE: MAXIMISE */
1691 /*Name*/ "-maximise" ,\
1692 /*Flag*/ &maximise ,\
1694 /*OPTIONAL?*/ OPTIONAL ,\
1696 /*DOC*/ "Deprecated" ,\
1697 /*Parameter*/ &maximise ,\
1700 /*Min_value*/ "any" ,\
1701 /*Max Value*/ "any" \
1704 /*PARAMETER PROTOTYPE: OUTPUT_FORMAT */
1705 out_aln_format=declare_char ( 200, STRING);
1706 n_out_aln_format=get_cl_param(\
1710 /*Name*/ "-output" ,\
1711 /*Flag*/ &garbage ,\
1713 /*OPTIONAL?*/ OPTIONAL ,\
1715 /*DOC*/ "Specifies one or many formats that must be output: clustalw_aln, msf_aln. The file extension is the output format" ,\
1716 /*Parameter*/ out_aln_format,\
1717 /*Def 1*/ "aln,html" ,\
1719 /*Min_value*/ "any" ,\
1720 /*Max Value*/ "any" \
1722 /*PARAMETER PROTOTYPE: INFILE */
1723 declare_name (infile);
1728 /*Name*/ "-infile" ,\
1729 /*Flag*/ &garbage ,\
1731 /*OPTIONAL?*/ OPTIONAL ,\
1733 /*DOC*/ "input a pre-computed alignment, or a file to reformat" ,\
1734 /*Parameter*/ &infile ,\
1737 /*Min_value*/ "any" ,\
1738 /*Max Value*/ "any" \
1741 /*PARAMETER PROTOTYPE: INFILE */
1742 declare_name (matrix);
1747 /*Name*/ "-matrix" ,\
1748 /*Flag*/ &garbage ,\
1750 /*OPTIONAL?*/ OPTIONAL ,\
1752 /*DOC*/ "Specifies the substitution matrix.",\
1753 /*Parameter*/ &matrix ,\
1754 /*Def 1*/ "default" ,\
1755 /*Def 2*/ "default" ,\
1756 /*Min_value*/ "any" ,\
1757 /*Max Value*/ "any" \
1759 /*PARAMETER PROTOTYPE: TG_MODE */
1765 /*Name*/ "-tg_mode" ,\
1766 /*Flag*/ &garbage ,\
1768 /*OPTIONAL?*/ OPTIONAL ,\
1770 /*DOC*/ "0: Penalise Term gap with gapopen and gapext\n1: gapopen only\n2: No penalty\n",\
1771 /*Parameter*/ &tg_mode ,\
1774 /*Min_value*/ "any" ,\
1775 /*Max Value*/ "any" \
1777 /*PARAMETER PROTOTYPE: DP_MODE */
1778 declare_name (profile_mode);
1783 /*Name*/ "-profile_mode" ,\
1784 /*Flag*/ &garbage ,\
1786 /*OPTIONAL?*/ OPTIONAL ,\
1788 /*DOC*/ "Function used to compute profile2profile scores",\
1789 /*Parameter*/ &profile_mode ,\
1790 /*Def 1*/ "cw_profile_profile",\
1791 /*Def 2*/ "cw_profile_profile",\
1792 /*Min_value*/ "any" ,\
1793 /*Max Value*/ "any" \
1796 declare_name (profile_comparison);
1801 /*Name*/ "-profile_comparison" ,\
1802 /*Flag*/ &garbage ,\
1804 /*OPTIONAL?*/ OPTIONAL ,\
1806 /*DOC*/ "Method used to compare two profiles: full<N>: compares <every | N best> pair of sequence and every pair of structure if a structure method is used,profile: compares only the profiles. ",\
1807 /*Parameter*/ &profile_comparison ,\
1808 /*Def 1*/ "profile",\
1809 /*Def 2*/ "full50",\
1810 /*Min_value*/ "any" ,\
1811 /*Max Value*/ "any" \
1813 /*PARAMETER PROTOTYPE: DP_MODE */
1814 declare_name (dp_mode);
1819 /*Name*/ "-dp_mode" ,\
1820 /*Flag*/ &garbage ,\
1822 /*OPTIONAL?*/ OPTIONAL ,\
1824 /*DOC*/ "Type of alignment algorithm used by T-Coffee: gotoh_pair_wise, myers_millers_pair_wise, " ,\
1825 /*Parameter*/ &dp_mode ,\
1826 /*Def 1*/ "linked_pair_wise",\
1827 /*Def 2*/ "cfasta_pair_wise",\
1828 /*Min_value*/ "any" ,\
1829 /*Max Value*/ "any" \
1831 /*PARAMETER PROTOTYPE: KTUP */
1836 /*Name*/ "-ktuple" ,\
1837 /*Flag*/ &garbage ,\
1839 /*OPTIONAL?*/ OPTIONAL ,\
1841 /*DOC*/ "Word size when using the heursitic dynamic programming modes fasta_pair_wise and cfasta_pair_wise " ,\
1842 /*Parameter*/ &ktup ,\
1845 /*Min_value*/ "any" ,\
1846 /*Max Value*/ "any" \
1848 /*PARAMETER PROTOTYPE: FASTA_STEP */
1853 /*Name*/ "-ndiag" ,\
1854 /*Flag*/ &garbage ,\
1856 /*OPTIONAL?*/ OPTIONAL ,\
1858 /*DOC*/ "Number of diagonals to consider when using the heursitic dynamic programming modes fasta_pair_wise and cfasta_pair_wise" ,\
1859 /*Parameter*/ &fasta_step ,\
1862 /*Min_value*/ "any" ,\
1863 /*Max Value*/ "any" \
1865 /*PARAMETER PROTOTYPE: FASTA_STEP */
1870 /*Name*/ "-diag_threshold" ,\
1871 /*Flag*/ &garbage ,\
1873 /*OPTIONAL?*/ OPTIONAL ,\
1876 /*Parameter*/ &diag_threshold ,\
1879 /*Min_value*/ "any" ,\
1880 /*Max Value*/ "any" \
1882 /*PARAMETER PROTOTYPE: diag_mode */
1887 /*Name*/ "-diag_mode" ,\
1888 /*Flag*/ &garbage ,\
1890 /*OPTIONAL?*/ OPTIONAL ,\
1892 /*DOC*/ "0: Use the whole Diag\n1: Use the best match\n" ,\
1893 /*Parameter*/ &diag_mode ,\
1896 /*Min_value*/ "any" ,\
1897 /*Max Value*/ "any" \
1899 /*PARAMETER PROTOTYPE: SIM_MATRIX */
1900 declare_name (sim_matrix);
1905 /*Name*/ "-sim_matrix" ,\
1906 /*Flag*/ &garbage ,\
1908 /*OPTIONAL?*/ OPTIONAL ,\
1910 /*DOC*/ "Degenerated matrix used to compute a similarity" ,\
1911 /*Parameter*/ &sim_matrix ,\
1912 /*Def 1*/ "vasiliky",\
1914 /*Min_value*/ "any" ,\
1915 /*Max Value*/ "any" \
1918 /*PARAMETER PROTOTYPE: INFILE */
1919 declare_name (transform);
1924 /*Name*/ "-transform" ,\
1925 /*Flag*/ &garbage ,\
1927 /*OPTIONAL?*/ OPTIONAL ,\
1929 /*DOC*/ "dna2rna, rna2dna, dna2prot", \
1930 /*Parameter*/ &transform ,\
1933 /*Min_value*/ "any" ,\
1934 /*Max Value*/ "any" \
1937 /*PARAMETER PROTOTYPE: INFILE */
1938 declare_name (outorder);
1943 /*Name*/ "-outorder" ,\
1944 /*Flag*/ &garbage ,\
1946 /*OPTIONAL?*/ OPTIONAL ,\
1948 /*DOC*/ "Specifies the order of the sequences in the msa: input or aligned" ,\
1949 /*Parameter*/ &outorder ,\
1950 /*Def 1*/ "input" ,\
1951 /*Def 2*/ "input" ,\
1952 /*Min_value*/ "any" ,\
1953 /*Max Value*/ "any" \
1956 /*PARAMETER PROTOTYPE: INFILE */
1957 declare_name (inorder);
1962 /*Name*/ "-inorder" ,\
1963 /*Flag*/ &garbage ,\
1965 /*OPTIONAL?*/ OPTIONAL ,\
1967 /*DOC*/ "aligned: sort the sequences in alphabetic order before starting thus making the input order irrelevant but delivering a library in arbitratry order, keep: input order is used in the library but results become input order dependant" ,\
1968 /*Parameter*/ &inorder ,\
1969 /*Def 1*/ "aligned" ,\
1970 /*Def 2*/ "input" ,\
1971 /*Min_value*/ "any" ,\
1972 /*Max Value*/ "any" \
1975 /*PARAMETER PROTOTYPE: INFILE */
1976 declare_name (output_res_num);
1981 /*Name*/ "-seqnos" ,\
1982 /*Flag*/ &garbage ,\
1984 /*OPTIONAL?*/ OPTIONAL ,\
1986 /*DOC*/ "Adds Residue Numbers to the MSA" ,\
1987 /*Parameter*/ &output_res_num ,\
1990 /*Min_value*/ "any" ,\
1991 /*Max Value*/ "any" \
1993 /*PARAMETER PROTOTYPE: INFILE */
1994 declare_name (residue_case);
2000 /*Flag*/ &garbage ,\
2002 /*OPTIONAL?*/ OPTIONAL ,\
2004 /*DOC*/ "Causes the case to be: kept:lower:upper." ,\
2005 /*Parameter*/ &residue_case ,\
2007 /*Def 2*/ "upper" ,\
2008 /*Min_value*/ "any" ,\
2009 /*Max Value*/ "any" \
2012 /*PARAMETER PROTOTYPE: CPU */
2019 /*Flag*/ &garbage ,\
2021 /*OPTIONAL?*/ OPTIONAL ,\
2023 /*DOC*/ "Makes it possible to add a pre-specified amount of cpu time to the measured usage" ,\
2024 /*Parameter*/ &extra_cpu ,\
2027 /*Min_value*/ "any" ,\
2028 /*Max Value*/ "any" \
2031 /*PARAMETER PROTOTYPE: MAXNSEQ */
2037 /*Name*/ "-maxnseq" ,\
2038 /*Flag*/ &garbage ,\
2040 /*OPTIONAL?*/ OPTIONAL ,\
2042 /*DOC*/ "Maximum number of sequences (-1=no max)" ,\
2043 /*Parameter*/ &maxnseq ,\
2046 /*Min_value*/ "any" ,\
2047 /*Max Value*/ "any" \
2050 /*PARAMETER PROTOTYPE: MAXLEN */
2056 /*Name*/ "-maxlen" ,\
2057 /*Flag*/ &garbage ,\
2059 /*OPTIONAL?*/ OPTIONAL ,\
2061 /*DOC*/ "Maximum length of a sequence (-1=no max)" ,\
2062 /*Parameter*/ &maxlen ,\
2065 /*Min_value*/ "any" ,\
2066 /*Max Value*/ "any" \
2070 /*PARAMETER PROTOTYPE: WEIGHT */
2071 declare_name ( weight);
2076 /*Name*/ "-weight" ,\
2077 /*Flag*/ &garbage ,\
2079 /*OPTIONAL?*/ OPTIONAL ,\
2081 /*DOC*/ "Defines the library weight: sim OR sim_(matrix) OR winsim" ,\
2082 /*Parameter*/ &weight ,\
2083 /*Def 1*/ "default" ,\
2085 /*Min_value*/ "any" ,\
2086 /*Max Value*/ "any" \
2087 ); /*PARAMETER PROTOTYPE: WEIGHT */
2088 declare_name ( seq_weight);
2094 /*Name*/ "-seq_weight" ,\
2095 /*Flag*/ &garbage ,\
2097 /*OPTIONAL?*/ OPTIONAL ,\
2099 /*DOC*/ "Defines the sequences weighting scheme t_coffee" ,\
2100 /*Parameter*/ &seq_weight ,\
2101 /*Def 1*/ "t_coffee" ,\
2102 /*Def 2*/ "t_coffee" ,\
2103 /*Min_value*/ "any" ,\
2104 /*Max Value*/ "any" \
2107 /*PARAMETER PROTOTYPE: DO ALIGN */
2112 /*Name*/ "-align" ,\
2113 /*Flag*/ &do_align ,\
2115 /*OPTIONAL?*/ OPTIONAL ,\
2117 /*DOC*/ "forces the program to make the alignment" ,\
2118 /*Parameter*/ &do_align ,\
2121 /*Min_value*/ "any" ,\
2122 /*Max Value*/ "any" \
2124 /*PARAMETER PROTOTYPE: DO DOMAIN */
2129 /*Name*/ "-mocca" ,\
2130 /*Flag*/ &do_domain ,\
2132 /*OPTIONAL?*/ OPTIONAL ,\
2134 /*DOC*/ "forces the program to extract domains" ,\
2135 /*Parameter*/ &do_domain ,\
2138 /*Min_value*/ "any" ,\
2139 /*Max Value*/ "any" \
2143 /*PARAMETER PROTOTYPE: DO DOMAIN */
2148 /*Name*/ "-domain" ,\
2149 /*Flag*/ &do_domain ,\
2151 /*OPTIONAL?*/ OPTIONAL ,\
2153 /*DOC*/ "forces the program to extract domains" ,\
2154 /*Parameter*/ &do_domain ,\
2157 /*Min_value*/ "any" ,\
2158 /*Max Value*/ "any" \
2161 /*PARAMETER PROTOTYPE: Domain Param */
2166 /*Name*/ "-start" ,\
2167 /*Flag*/ &domain_start ,\
2169 /*OPTIONAL?*/ OPTIONAL ,\
2171 /*DOC*/ "start of the master domain in the mocca mode" ,\
2172 /*Parameter*/ &domain_start ,\
2175 /*Min_value*/ "any" ,\
2176 /*Max Value*/ "any" \
2183 /*Flag*/ &domain_len ,\
2185 /*OPTIONAL?*/ OPTIONAL ,\
2187 /*DOC*/ "length of the master domain in the mocca mode" ,\
2188 /*Parameter*/ &domain_len ,\
2191 /*Min_value*/ "any" ,\
2192 /*Max Value*/ "any" \
2199 /*Name*/ "-scale" ,\
2200 /*Flag*/ &domain_scale ,\
2202 /*OPTIONAL?*/ OPTIONAL ,\
2204 /*DOC*/ "Decreases the t_coffee score by Scale, so that non match get negative values" ,\
2205 /*Parameter*/ &domain_scale ,\
2208 /*Min_value*/ "any" ,\
2209 /*Max Value*/ "any" \
2215 /*Name*/ "-mocca_interactive" ,\
2216 /*Flag*/ &domain_interactive ,\
2218 /*OPTIONAL?*/ OPTIONAL ,\
2220 /*DOC*/ "Runs Mocca in an interactive manneer" ,\
2221 /*Parameter*/ &domain_interactive,\
2224 /*Min_value*/ "any" ,\
2225 /*Max Value*/ "any" \
2227 /*PARAMETER PROTOTYPE: WEIGHT */
2228 declare_name (method_evaluate_mode);
2233 /*Name*/ "-method_evaluate_mode" ,\
2234 /*Flag*/ &garbage ,\
2236 /*OPTIONAL?*/ OPTIONAL ,\
2238 /*DOC*/ "Specifies which method should be used to evaluate the score at the pairwise level" ,\
2239 /*Parameter*/ &method_evaluate_mode ,\
2240 /*Def 1*/ "default" ,\
2241 /*Def 2*/ "default" ,\
2242 /*Min_value*/ "any" ,\
2243 /*Max Value*/ "any" \
2245 /*PARAMETER PROTOTYPE: WEIGHT */
2246 declare_name (evaluate_mode);
2251 /*Name*/ "-evaluate_mode" ,\
2252 /*Flag*/ &garbage ,\
2254 /*OPTIONAL?*/ OPTIONAL ,\
2256 /*DOC*/ "Mode used to produce the color output:t_coffee_fast,t_coffee_slow " ,\
2257 /*Parameter*/ &evaluate_mode ,\
2258 /*Def 1*/ "t_coffee_fast" ,\
2260 /*Min_value*/ "any" ,\
2261 /*Max Value*/ "any" \
2267 /*Name*/ "-get_type" ,\
2268 /*Flag*/ &get_type ,\
2270 /*OPTIONAL?*/ OPTIONAL ,\
2272 /*DOC*/ "forces t_coffee top get the type of the sequences" ,\
2273 /*Parameter*/ &get_type ,\
2276 /*Min_value*/ "0" ,\
2284 /*Name*/ "-clean_aln" ,\
2285 /*Flag*/ &clean_aln ,\
2287 /*OPTIONAL?*/ OPTIONAL ,\
2289 /*DOC*/ "Forces weak portion of aln to be realigned" ,\
2290 /*Parameter*/ &clean_aln ,\
2293 /*Min_value*/ "0" ,\
2300 /*Name*/ "-clean_threshold" ,\
2301 /*Flag*/ &clean_threshold ,\
2303 /*OPTIONAL?*/ OPTIONAL ,\
2305 /*DOC*/ "Threshold for the portions of the MSA that will are realigned by '-clean_evaluate_mode'. The threshold refers to the CORE score set by '-evaluate_mode'" ,\
2306 /*Parameter*/ &clean_threshold ,\
2309 /*Min_value*/ "any" ,\
2310 /*Max Value*/ "any" \
2316 /*Name*/ "-clean_iteration" ,\
2317 /*Flag*/ &clean_iteration ,\
2319 /*OPTIONAL?*/ OPTIONAL ,\
2321 /*DOC*/ "Number of rounds for '-clean_aln'" ,\
2322 /*Parameter*/ &clean_iteration ,\
2325 /*Min_value*/ "any" ,\
2326 /*Max Value*/ "any" \
2328 declare_name (clean_evaluate_mode);
2333 /*Name*/ "-clean_evaluate_mode" ,\
2334 /*Flag*/ &garbage ,\
2336 /*OPTIONAL?*/ OPTIONAL ,\
2338 /*DOC*/ "Mode used to score residues (see evaluate_mode)" ,\
2339 /*Parameter*/ &clean_evaluate_mode ,\
2340 /*Def 1*/ "t_coffee_fast" ,\
2341 /*Def 2*/ "t_coffee_fast" ,\
2342 /*Min_value*/ "any" ,\
2343 /*Max Value*/ "any" \
2346 /*PARAMETER PROTOTYPE: DO EXTENDED MATRIX */
2351 /*Name*/ "-extend_matrix" ,\
2352 /*Flag*/ &do_extended_matrix ,\
2354 /*OPTIONAL?*/ OPTIONAL ,\
2356 /*DOC*/ "Deprecated" ,\
2357 /*Parameter*/ &do_extended_matrix ,\
2360 /*Min_value*/ "any" ,\
2361 /*Max Value*/ "any" \
2367 /*Name*/ "-prot_min_sim" ,\
2368 /*Flag*/ &prot_min_sim ,\
2370 /*OPTIONAL?*/ OPTIONAL ,\
2372 /*DOC*/ "Minimum similarity between a sequence and its PDB target" ,\
2373 /*Parameter*/ &prot_min_sim ,\
2376 /*Min_value*/ "any" ,\
2377 /*Max Value*/ "any" \
2379 set_int_variable ("prot_min_sim", prot_min_sim);
2385 /*Name*/ "-prot_max_sim" ,\
2386 /*Flag*/ &prot_max_sim ,\
2388 /*OPTIONAL?*/ OPTIONAL ,\
2390 /*DOC*/ "Maximum similarity between a sequence and its BLAST relatives" ,\
2391 /*Parameter*/ &prot_max_sim ,\
2394 /*Min_value*/ "any" ,\
2395 /*Max Value*/ "any" \
2397 set_int_variable ("prot_max_sim", prot_max_sim);
2403 /*Name*/ "-prot_min_cov" ,\
2404 /*Flag*/ &prot_min_cov ,\
2406 /*OPTIONAL?*/ OPTIONAL ,\
2408 /*DOC*/ "Minimum coverage of a sequence by its BLAST relatives" ,\
2409 /*Parameter*/ &prot_min_cov ,\
2412 /*Min_value*/ "any" ,\
2413 /*Max Value*/ "any" \
2415 set_int_variable ("prot_min_cov", prot_min_cov);
2421 /*Name*/ "-pdb_min_sim" ,\
2422 /*Flag*/ &pdb_min_sim ,\
2424 /*OPTIONAL?*/ OPTIONAL ,\
2426 /*DOC*/ "Minimum similarity between a sequence and its PDB target" ,\
2427 /*Parameter*/ &pdb_min_sim ,\
2430 /*Min_value*/ "any" ,\
2431 /*Max Value*/ "any" \
2434 set_int_variable ("pdb_min_sim", pdb_min_sim);
2439 /*Name*/ "-pdb_max_sim" ,\
2440 /*Flag*/ &pdb_max_sim ,\
2442 /*OPTIONAL?*/ OPTIONAL ,\
2444 /*DOC*/ "Maximum similarity between a sequence and its PDB target" ,\
2445 /*Parameter*/ &pdb_max_sim ,\
2448 /*Min_value*/ "any" ,\
2449 /*Max Value*/ "any" \
2451 set_int_variable ("pdb_max_sim", pdb_max_sim);
2456 /*Name*/ "-pdb_min_cov" ,\
2457 /*Flag*/ &pdb_min_cov ,\
2459 /*OPTIONAL?*/ OPTIONAL ,\
2461 /*DOC*/ "Minimum coverage of a sequence by its PDB target" ,\
2462 /*Parameter*/ &pdb_min_cov ,\
2465 /*Min_value*/ "any" ,\
2466 /*Max Value*/ "any" \
2468 set_int_variable ("pdb_min_cov", pdb_min_cov);
2472 declare_name (pdb_blast_server);
2477 /*Name*/ "-pdb_blast_server" ,\
2478 /*Flag*/ &garbage ,\
2480 /*OPTIONAL?*/ OPTIONAL ,\
2483 /*Parameter*/&pdb_blast_server ,\
2485 /*Def 2*/ "default" ,\
2486 /*Min_value*/ "any" ,\
2487 /*Max Value*/ "any" \
2489 declare_name (prot_blast_server);
2494 /*Name*/ "-blast" ,\
2495 /*Flag*/ &garbage ,\
2497 /*OPTIONAL?*/ OPTIONAL ,\
2500 /*Parameter*/&prot_blast_server ,\
2503 /*Min_value*/ "any" ,\
2504 /*Max Value*/ "any" \
2506 //make sure that -blast and -blast_server are both supported blast>blast_server
2507 if ( !prot_blast_server[0])
2513 /*Name*/ "-blast_server" ,\
2514 /*Flag*/ &garbage ,\
2516 /*OPTIONAL?*/ OPTIONAL ,\
2519 /*Parameter*/&prot_blast_server ,\
2521 /*Def 2*/ "default" ,\
2522 /*Min_value*/ "any" ,\
2523 /*Max Value*/ "any" \
2526 // HERE ("%s", blast_server);
2527 if ( strm (prot_blast_server, "env"))prot_blast_server=get_env_variable ("blast_server_4_TCOFFEE",IS_FATAL);
2528 set_string_variable ("blast_server", prot_blast_server);
2532 declare_name (pdb_db);
2537 /*Name*/ "-pdb_db" ,\
2538 /*Flag*/ &garbage ,\
2540 /*OPTIONAL?*/ OPTIONAL ,\
2542 /*DOC*/ "Non Redundant PDB database" ,\
2543 /*Parameter*/&pdb_db ,\
2545 /*Def 2*/ "default" ,\
2546 /*Min_value*/ "any" ,\
2547 /*Max Value*/ "any" \
2549 if ( strm (pdb_db, "env"))pdb_db=get_env_variable ("pdb_db_4_TCOFFEE", IS_FATAL);
2550 set_string_variable ("pdb_db", pdb_db);
2553 declare_name (prot_db);
2558 /*Name*/ "-protein_db" ,\
2559 /*Flag*/ &garbage ,\
2561 /*OPTIONAL?*/ OPTIONAL ,\
2564 /*Parameter*/&prot_db ,\
2565 /*Def 1*/ "uniprot" ,\
2566 /*Def 2*/ "default" ,\
2567 /*Min_value*/ "any" ,\
2568 /*Max Value*/ "any" \
2570 if ( strm (prot_db, "env"))prot_db=get_env_variable ("protein_db_4_TCOFFEE", IS_FATAL);
2571 set_string_variable ("prot_db", prot_db);
2573 declare_name (method_log);
2578 /*Name*/ "-method_log" ,\
2579 /*Flag*/ &garbage ,\
2581 /*OPTIONAL?*/ OPTIONAL ,\
2584 /*Parameter*/&method_log ,\
2586 /*Def 2*/ "default" ,\
2587 /*Min_value*/ "any" ,\
2588 /*Max Value*/ "any" \
2590 /*PARAMETER PROTOTYPE: IN */
2591 struc_to_use=declare_char ( 200, STRING);
2592 n_struc_to_use=get_cl_param(\
2596 /*Name*/ "-struc_to_use" ,\
2597 /*Flag*/ &garbage ,\
2599 /*OPTIONAL?*/ OPTIONAL ,\
2601 /*DOC*/ "Specifies the structures that must be used when combining sequences and structures. The default is to use all the structures." ,\
2602 /*Parameter*/ struc_to_use ,\
2604 /*Def 2*/ "stdin" ,\
2605 /*Min_value*/ "any" ,\
2606 /*Max Value*/ "any" \
2609 declare_name (cache);
2614 /*Name*/ "-cache" ,\
2615 /*Flag*/ &garbage ,\
2617 /*OPTIONAL?*/ OPTIONAL ,\
2619 /*DOC*/ "Specifies that a cache must be used to save the structures and their comparison, as well as the blast searches.\navailable modes are: use,ignore,update,local, directory name" ,\
2620 /*Parameter*/ &cache ,\
2622 /*Def 2*/ "update" ,\
2623 /*Min_value*/ "any" ,\
2624 /*Max Value*/ "any" \
2626 declare_name (align_pdb_param_file);
2631 /*Name*/ "-align_pdb_param_file" ,\
2632 /*Flag*/ &garbage ,\
2634 /*OPTIONAL?*/ OPTIONAL ,\
2636 /*DOC*/ "parameter_file" ,\
2637 /*Parameter*/ &align_pdb_param_file ,\
2640 /*Min_value*/ "any" ,\
2641 /*Max Value*/ "any" \
2643 declare_name (align_pdb_hasch_mode);
2648 /*Name*/ "-align_pdb_hasch_mode" ,\
2649 /*Flag*/ &garbage ,\
2651 /*OPTIONAL?*/ OPTIONAL ,\
2653 /*DOC*/ "parameter_file" ,\
2654 /*Parameter*/ &align_pdb_hasch_mode ,\
2655 /*Def 1*/ "hasch_ca_trace_bubble" ,\
2656 /*Def 2*/ "hasch_ca_trace_bubble" ,\
2657 /*Min_value*/ "any" ,\
2658 /*Max Value*/ "any" \
2660 declare_name (use_seqan);
2665 /*Name*/ "-external_aligner" ,\
2666 /*Flag*/ &garbage ,\
2668 /*OPTIONAL?*/ OPTIONAL ,\
2670 /*DOC*/ "Use seqan to compute the MSA",\
2671 /*Parameter*/ &use_seqan ,\
2673 /*Def 2*/ "seqan_tcoffee" ,\
2674 /*Min_value*/ "any" ,\
2675 /*Max Value*/ "any" \
2677 declare_name (msa_mode);
2682 /*Name*/ "-msa_mode" ,\
2683 /*Flag*/ &garbage ,\
2685 /*OPTIONAL?*/ OPTIONAL ,\
2687 /*DOC*/ "Algorithm used to compute the MSA: tree | graph" ,\
2688 /*Parameter*/ &msa_mode ,\
2691 /*Min_value*/ "any" ,\
2692 /*Max Value*/ "any" \
2694 declare_name (one2all);
2699 /*Name*/ "-one2all" ,\
2700 /*Flag*/ &garbage ,\
2702 /*OPTIONAL?*/ OPTIONAL ,\
2704 /*DOC*/ "Align all the sequences to the master sequence" ,\
2705 /*Parameter*/ &one2all ,\
2708 /*Min_value*/ "any" ,\
2709 /*Max Value*/ "any" \
2711 declare_name (subset2all);
2716 /*Name*/ "-subset2all" ,\
2717 /*Flag*/ &garbage ,\
2719 /*OPTIONAL?*/ OPTIONAL ,\
2721 /*DOC*/ "Align all the sequences to the master sequence" ,\
2722 /*Parameter*/ &subset2all ,\
2725 /*Min_value*/ "any" ,\
2726 /*Max Value*/ "any" \
2733 /*Name*/ "-lalign_n_top" ,\
2734 /*Flag*/ &garbage ,\
2736 /*OPTIONAL?*/ OPTIONAL ,\
2738 /*DOC*/ "Number of local alignments reported by the local method (lalign) when building the library" ,\
2739 /*Parameter*/ &lalign_n_top ,\
2742 /*Min_value*/ "any" ,\
2743 /*Max Value*/ "any" \
2749 /*Name*/ "-iterate" ,\
2750 /*Flag*/ &garbage ,\
2752 /*OPTIONAL?*/ OPTIONAL ,\
2754 /*DOC*/ "NUmber of iteration on the progressive alignment [0: no iteration, -1: Nseq iterations]",\
2755 /*Parameter*/ &iterate ,\
2758 /*Min_value*/ "any" ,\
2759 /*Max Value*/ "any" \
2767 /*Flag*/ &garbage ,\
2769 /*OPTIONAL?*/ OPTIONAL ,\
2771 /*DOC*/ "trim dataset",\
2772 /*Parameter*/ &trim ,\
2775 /*Min_value*/ "any" ,\
2776 /*Max Value*/ "any" \
2782 /*Name*/ "-split" ,\
2783 /*Flag*/ &garbage ,\
2785 /*OPTIONAL?*/ OPTIONAL ,\
2787 /*DOC*/ "split dataset",\
2788 /*Parameter*/ &split ,\
2791 /*Min_value*/ "any" ,\
2792 /*Max Value*/ "any" \
2794 declare_name(trimfile);
2799 /*Name*/ "-trimfile" ,\
2800 /*Flag*/ &garbage ,\
2802 /*OPTIONAL?*/ OPTIONAL ,\
2804 /*DOC*/ "trim dataset filename",\
2805 /*Parameter*/ &trimfile ,\
2806 /*Def 1*/ "default" ,\
2808 /*Min_value*/ "any" ,\
2809 /*Max Value*/ "any" \
2815 /*Name*/ "-split" ,\
2816 /*Flag*/ &garbage ,\
2818 /*OPTIONAL?*/ OPTIONAL ,\
2820 /*DOC*/ "split dataset",\
2821 /*Parameter*/ &split ,\
2824 /*Min_value*/ "any" ,\
2825 /*Max Value*/ "any" \
2828 if (trim && !split)split=trim;
2834 /*Name*/ "-split_nseq_thres" ,\
2835 /*Flag*/ &garbage ,\
2837 /*OPTIONAL?*/ OPTIONAL ,\
2839 /*DOC*/ "Maximum Number of sequences within a subgroup",\
2840 /*Parameter*/ &split_nseq_thres ,\
2843 /*Min_value*/ "any" ,\
2844 /*Max Value*/ "any" \
2850 /*Name*/ "-split_score_thres" ,\
2851 /*Flag*/ &garbage ,\
2853 /*OPTIONAL?*/ OPTIONAL ,\
2855 /*DOC*/ "Minimum score within a split dataset",\
2856 /*Parameter*/ &split_score_thres ,\
2859 /*Min_value*/ "any" ,\
2860 /*Max Value*/ "any" \
2866 /*Name*/ "-check_pdb_status" ,\
2867 /*Flag*/ &garbage ,\
2869 /*OPTIONAL?*/ OPTIONAL ,\
2871 /*DOC*/ "Reports the existance of a PDB file",\
2872 /*Parameter*/ &check_pdb_status ,\
2875 /*Min_value*/ "any" ,\
2876 /*Max Value*/ "any" \
2882 /*Name*/ "-clean_seq_name" ,\
2883 /*Flag*/ &garbage ,\
2885 /*OPTIONAL?*/ OPTIONAL ,\
2887 /*DOC*/ "Remove Special Char from sequence names",\
2888 /*Parameter*/ &clean_seq_name ,\
2891 /*Min_value*/ "any" ,\
2892 /*Max Value*/ "any" \
2896 /*PARAMETER PROTOTYPE: SEQ TO ALIGN */
2897 seq_to_keep=declare_char ( 2000, STRING);
2898 n_seq_to_keep=get_cl_param(\
2902 /*Name*/ "-seq_to_keep",\
2903 /*Flag*/ &garbage ,\
2905 /*OPTIONAL?*/ OPTIONAL ,\
2907 /*DOC*/ "File containing the name of the sequences to keep when triming OR a list of names)",\
2908 /*Parameter*/ seq_to_keep ,\
2911 /*Min_value*/ "any" ,\
2912 /*Max Value*/ "any" \
2914 /*******************************************************************************************************/
2916 /* TCoffee_dpa Parameter:START */
2918 /*******************************************************************************************************/
2919 /*PARAMETER PROTOTYPE: dpa_master_aln */
2920 declare_name (dpa_master_aln);
2925 /*Name*/ "-dpa_master_aln",\
2926 /*Flag*/ &garbage ,\
2928 /*OPTIONAL?*/ OPTIONAL ,\
2930 /*DOC*/ "Approximate Alignment: File|method",\
2931 /*Parameter*/ &dpa_master_aln ,\
2934 /*Min_value*/ "any" ,\
2935 /*Max Value*/ "any" \
2937 /*PARAMETER PROTOTYPE: dpa_maxnseq */
2943 /*Name*/ "-dpa_maxnseq",\
2944 /*Flag*/ &garbage ,\
2946 /*OPTIONAL?*/ OPTIONAL ,\
2948 /*DOC*/ "Maximum number of sequences to be aligned with DPA",\
2949 /*Parameter*/ &dpa_maxnseq ,\
2952 /*Min_value*/ "any" ,\
2953 /*Max Value*/ "any" \
2955 /*PARAMETER PROTOTYPE: dpa_min_score1 */
2961 /*Name*/ "-dpa_min_score1",\
2962 /*Flag*/ &garbage ,\
2964 /*OPTIONAL?*/ OPTIONAL ,\
2966 /*DOC*/ "Minimum percent ID to merge sequences in the approximate alignment",\
2967 /*Parameter*/ &dpa_min_score1 ,\
2970 /*Min_value*/ "0" ,\
2971 /*Max Value*/ "100" \
2973 /*PARAMETER PROTOTYPE: dpa_min_score2 */
2979 /*Name*/ "-dpa_min_score2",\
2980 /*Flag*/ &garbage ,\
2982 /*OPTIONAL?*/ OPTIONAL ,\
2984 /*DOC*/ "Threshold for aligning a group in the slow double progressive alignment (automatically readjusted)",\
2985 /*Parameter*/ &dpa_min_score2 ,\
2988 /*Min_value*/ "0" ,\
2989 /*Max Value*/ "100" \
2991 /*PARAMETER PROTOTYPE: dpa_keep_tmp_file */
2996 /*Name*/ "-dpa_keep_tmpfile" ,\
2997 /*Flag*/ &dpa_keep_tmpfile ,\
2999 /*OPTIONAL?*/ OPTIONAL ,\
3001 /*DOC*/ "Prevents deletion of the tmpfile generated by t_coffee_dpa",\
3002 /*Parameter*/ &do_version ,\
3005 /*Min_value*/ "0" ,\
3009 /*PARAMETER PROTOTYPE: dpa_debug */
3014 /*Name*/ "-dpa_debug" ,\
3015 /*Flag*/ &dpa_debug ,\
3017 /*OPTIONAL?*/ OPTIONAL ,\
3019 /*DOC*/ "DEbug mode for DPA ( causes dpa tmp files to be kept)",\
3020 /*Parameter*/ &do_version ,\
3023 /*Min_value*/ "0" ,\
3028 /*PARAMETER PROTOTYPE: multi_core */
3029 declare_name (multi_core);
3034 /*Name*/ "-multi_core",\
3035 /*Flag*/ &garbage ,\
3037 /*OPTIONAL?*/ OPTIONAL ,\
3039 /*DOC*/ "Multi core: template_jobs_relax_msa",\
3040 /*Parameter*/ &multi_core ,\
3041 /*Def 1*/ "templates_jobs_relax_msa" ,\
3042 /*Def 2*/ "templates_jobs_relax_msa" ,\
3043 /*Min_value*/ "0" ,\
3044 /*Max Value*/ "100" \
3046 if (multi_core[0])set_string_variable ("multi_core",multi_core);
3047 /*PARAMETER PROTOTYPE: multi_core */
3052 /*Name*/ "-n_core",\
3053 /*Flag*/ &garbage ,\
3055 /*OPTIONAL?*/ OPTIONAL ,\
3057 /*DOC*/ "Number of cores to be used by machine [default=0 => all those defined in the environement]",\
3058 /*Parameter*/ &n_core ,\
3061 /*Min_value*/ "0" ,\
3062 /*Max Value*/ "100" \
3064 if (n_core)set_int_variable ("n_core",n_core);
3067 /*PARAMETER PROTOTYPE: lib_list */
3068 declare_name (lib_list);
3073 /*Name*/ "-lib_list",\
3074 /*Flag*/ &garbage ,\
3076 /*OPTIONAL?*/ OPTIONAL ,\
3078 /*DOC*/ "A File that contains every pair/group of sequence to process when computing the lib, Format:<nseq> <index1><index2>",\
3079 /*Parameter*/ &lib_list ,\
3081 /*Def 2*/ "default" ,\
3082 /*Min_value*/ "0" ,\
3083 /*Max Value*/ "100" \
3086 /*PARAMETER PROTOTYPE: lib_list */
3087 declare_name (prune_lib_mode);
3092 /*Name*/ "-prune_lib_mode",\
3093 /*Flag*/ &garbage ,\
3095 /*OPTIONAL?*/ OPTIONAL ,\
3097 /*DOC*/ "A File that contains every pair/group of sequence to process when computing the lib, Format:<nseq> <index1><index2>",\
3098 /*Parameter*/ &prune_lib_mode ,\
3101 /*Min_value*/ "0" ,\
3102 /*Max Value*/ "100" \
3104 set_string_variable ("prune_lib_mode",prune_lib_mode);
3106 /*PARAMETER PROTOTYPE: multi_thread */
3113 /*Flag*/ &garbage ,\
3115 /*OPTIONAL?*/ OPTIONAL ,\
3117 /*DOC*/ "Controls The Output of A TIP When Computation is over [one,all,none]",\
3118 /*Parameter*/ &tip ,\
3121 /*Min_value*/ "any" ,\
3122 /*Max Value*/ "any" \
3124 /*PARAMETER PROTOTYPE: RNA LIB */
3125 declare_name (rna_lib);
3130 /*Name*/ "-rna_lib",\
3131 /*Flag*/ &garbage ,\
3133 /*OPTIONAL?*/ OPTIONAL ,\
3136 /*Parameter*/ &rna_lib ,\
3139 /*Min_value*/ "any" ,\
3140 /*Max Value*/ "any" \
3146 /*Name*/ "-no_warning",\
3147 /*Flag*/ &garbage ,\
3149 /*OPTIONAL?*/ OPTIONAL ,\
3151 /*DOC*/ "Suppresses all Warnings",\
3152 /*Parameter*/ &no_warning ,\
3155 /*Min_value*/ "0" ,\
3162 /*Name*/ "-run_local_script",\
3163 /*Flag*/ &garbage , \
3165 /*OPTIONAL?*/ OPTIONAL , \
3167 /*DOC*/ "Run Local Script if in current directory", \
3168 /*Parameter*/ &run_local_script , \
3171 /*Min_value*/ "0" , \
3174 set_int_variable ("run_local_script", run_local_script);
3175 declare_name (plugins);
3180 /*Name*/ "-plugins",\
3181 /*Flag*/ &garbage , \
3183 /*OPTIONAL?*/ OPTIONAL , \
3185 /*DOC*/ "Set the directory containing the plugins", \
3186 /*Parameter*/ &plugins , \
3187 /*Def 1*/ "default" , \
3189 /*Min_value*/ "any" , \
3190 /*Max Value*/ "any" \
3192 if ( !strm (plugins, "default"))
3194 set_path_4_plugins (plugins);
3198 declare_name (proxy);
3204 /*Flag*/ &garbage ,\
3206 /*OPTIONAL?*/ OPTIONAL ,\
3208 /*DOC*/ "proxy used to access to webservices, when required",\
3209 /*Parameter*/ &proxy ,\
3210 /*Def 1*/ "unset" ,\
3212 /*Min_value*/ "any" ,\
3213 /*Max Value*/ "any" \
3215 if ( !strm (proxy, "unset"))set_string_variable ("cl_proxy",proxy);
3216 declare_name (email);
3222 /*Flag*/ &garbage ,\
3224 /*OPTIONAL?*/ OPTIONAL ,\
3226 /*DOC*/ "email provided to webservices, when required",\
3227 /*Parameter*/ &email ,\
3230 /*Min_value*/ "any" ,\
3231 /*Max Value*/ "any" \
3233 if ( strstr (email, "@"))
3235 set_string_variable ("email", email);
3236 set_string_variable ("cl_email", email);
3243 /*Name*/ "-clean_overaln",\
3244 /*Flag*/ &garbage ,\
3246 /*OPTIONAL?*/ OPTIONAL ,\
3248 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3249 /*Parameter*/ &clean_overaln ,\
3252 /*Min_value*/ "any" ,\
3253 /*Max Value*/ "any" \
3255 overaln_param=declare_char ( 10, STRING);
3256 n_overaln_param=get_cl_param( \
3260 /*Name*/ "-overaln_param",\
3261 /*Flag*/ &garbage ,\
3263 /*OPTIONAL?*/ OPTIONAL ,\
3265 /*DOC*/ "Parameters for the overaln",\
3266 /*Parameter*/ overaln_param ,\
3269 /*Min_value*/ "any" ,\
3270 /*Max Value*/ "any" \
3272 declare_name (overaln_mode);
3277 /*Name*/ "-overaln_mode",\
3278 /*Flag*/ &garbage ,\
3280 /*OPTIONAL?*/ OPTIONAL ,\
3282 /*DOC*/ "lower || uanlaign",\
3283 /*Parameter*/ &overaln_mode ,\
3286 /*Min_value*/ "any" ,\
3287 /*Max Value*/ "any" \
3289 if (overaln_mode[0])set_string_variable ("overaln_mode", overaln_mode);
3290 declare_name (overaln_model);
3295 /*Name*/ "-overaln_model",\
3296 /*Flag*/ &garbage ,\
3298 /*OPTIONAL?*/ OPTIONAL ,\
3300 /*DOC*/ "fsa1 (no exon boundaries), fsa2 (exon boundaries)",\
3301 /*Parameter*/ &overaln_model ,\
3304 /*Min_value*/ "any" ,\
3305 /*Max Value*/ "any" \
3307 if (overaln_mode[0])set_string_variable ("overaln_model", overaln_model);
3313 /*Name*/ "-overaln_threshold",\
3314 /*Flag*/ &garbage ,\
3316 /*OPTIONAL?*/ OPTIONAL ,\
3318 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3319 /*Parameter*/ &overaln_threshold ,\
3322 /*Min_value*/ "any" ,\
3323 /*Max Value*/ "any" \
3325 set_int_variable ("overaln_threshold", overaln_threshold);
3331 /*Name*/ "-overaln_target",\
3332 /*Flag*/ &garbage ,\
3334 /*OPTIONAL?*/ OPTIONAL ,\
3336 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3337 /*Parameter*/ &overaln_target ,\
3340 /*Min_value*/ "any" ,\
3341 /*Max Value*/ "any" \
3343 set_int_variable ("overaln_target", overaln_threshold);
3349 /*Name*/ "-overaln_P1",\
3350 /*Flag*/ &garbage ,\
3352 /*OPTIONAL?*/ OPTIONAL ,\
3354 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3355 /*Parameter*/ &overaln_P1 ,\
3358 /*Min_value*/ "any" ,\
3359 /*Max Value*/ "any" \
3361 if (overaln_P1)set_int_variable ("overaln_P1", overaln_P1);
3367 /*Name*/ "-overaln_P2",\
3368 /*Flag*/ &garbage ,\
3370 /*OPTIONAL?*/ OPTIONAL ,\
3372 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3373 /*Parameter*/ &overaln_P2 ,\
3376 /*Min_value*/ "any" ,\
3377 /*Max Value*/ "any" \
3379 if (overaln_P2)set_int_variable ("overaln_P2", overaln_P2);
3385 /*Name*/ "-overaln_P3",\
3386 /*Flag*/ &garbage ,\
3388 /*OPTIONAL?*/ OPTIONAL ,\
3390 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3391 /*Parameter*/ &overaln_P3 ,\
3394 /*Min_value*/ "any" ,\
3395 /*Max Value*/ "any" \
3397 if (overaln_P3)set_int_variable ("overaln_P3", overaln_P3);
3403 /*Name*/ "-overaln_P4",\
3404 /*Flag*/ &garbage ,\
3406 /*OPTIONAL?*/ OPTIONAL ,\
3408 /*DOC*/ "Ratio between overaligned exon id Vs legitimates *100",\
3409 /*Parameter*/ &overaln_P4 ,\
3412 /*Min_value*/ "any" ,\
3413 /*Max Value*/ "any" \
3415 if (overaln_P4)set_int_variable ("overaln_P4", overaln_P4);
3418 declare_name (exon_boundaries);
3423 /*Name*/ "-exon_boundaries",\
3424 /*Flag*/ &garbage ,\
3426 /*OPTIONAL?*/ OPTIONAL ,\
3428 /*DOC*/ "exon_boundaries [EBI boj format]",\
3429 /*Parameter*/ &exon_boundaries ,\
3432 /*Min_value*/ "any" ,\
3433 /*Max Value*/ "any" \
3435 if ( exon_boundaries[0])set_string_variable ("exon_boundaries", exon_boundaries);
3440 /*******************************************************************************************************/
3442 /* Standard Initialization:END */
3444 /*******************************************************************************************************/
3445 standard_initialisation_end ( argv, &argc);
3446 /*******************************************************************************************************/
3448 /* TCoffee_dpa Parameter:END */
3450 /*******************************************************************************************************/
3454 if (argc==1 || name_is_in_list("-help", argv, argc, STRING)!=-1 )
3456 display_method_names ("display", stdout);
3457 return EXIT_SUCCESS;
3459 get_cl_param( argc, argv,&le, NULL,NULL,NULL,0,0,NULL);
3460 prepare_cache (cache);
3461 /*******************************************************************************************************/
3463 /* FILL list_file (contains seq, aln and meth) */
3465 /*******************************************************************************************************/
3469 /*Re-introduce the sequences introduced with -infile*/
3472 if ( infile[0] && !do_evaluate)
3474 sprintf ( list_file[n_list++], "%s",infile);
3476 /*DO EVALUATE: The aln to evaluate must be provided via -infile*/
3477 else if (do_evaluate)
3479 if (!infile[0] || !(main_read_aln ( infile, NULL)))
3481 fprintf ( stderr,"\nERROR: When using -evaluate, Provide a multiple sequence alignment via the -infile flag [FATAL:%s]\n", PROGRAM);
3482 myexit (EXIT_FAILURE);
3484 else if (! main_read_aln ( infile,NULL))
3486 fprintf ( stderr,"\nERROR: FILE %s is NOT a valid alignment [FATAL:%s]\n", infile, PROGRAM);
3487 myexit (EXIT_FAILURE);
3489 else if ( infile[0]=='A' ||infile[0]=='S')
3491 sprintf ( list_file[n_list++], "S%s",infile+1);
3493 else sprintf ( list_file[n_list++], "S%s",infile);
3498 /*Make Sure -infile is set*/
3499 if (!infile[0]&& (do_evaluate || do_convert))
3502 if ( do_evaluate || do_convert)sprintf ( infile, "%s",seq_list[0]);
3506 /*Introduce the sequences from the -profile flag*/
3507 if ( profile1 && profile1[0])
3509 sprintf ( list_file[n_list++], "R%s",profile1);
3511 if ( profile2 && profile2[0])
3513 sprintf ( list_file[n_list++], "R%s",profile2);
3516 for ( a=0; a< n_profile_list; a++)
3519 if ( (fp=find_token_in_file (profile_list[a], NULL, "FILE_LIST"))!=NULL)
3524 fp=vfopen (profile_list[a], "r");
3526 while ( (z=fgetc(fp))!=EOF)
3529 fscanf (fp, "%s\n", rname);
3530 if ( check_file_exists(rname))sprintf ( list_file[n_list++], "R%s", rname);
3534 else if (format_is_conc_aln (profile_list[a]))
3539 P=input_conc_aln (profile_list[a],NULL);
3542 cname=vtmpnam (NULL);
3543 output_fasta_aln (cname, P);
3545 sprintf ( list_file[n_list++], "R%s",cname);
3552 sprintf ( list_file[n_list++], "R%s",profile_list[a]);
3555 /*Introduce the sequences from the -seq flag*/
3556 for (a=0; a<n_seq_list; a++)
3558 if (check_file_exists(seq_list[a]))
3559 sprintf (list_file[n_list++], "S%s",seq_list[a]);
3560 else if ( check_file_exists (seq_list[a]+1))
3561 sprintf (list_file[n_list++], "%s",seq_list[a]);
3563 /*introduce the alignments from the -aln flag*/
3564 //Importnat: Must be introduced AFTER the profiles
3565 for (a=0; a<n_aln_file_list; a++)
3567 sprintf (list_file[n_list++], "A%s",aln_file_list[a]);
3569 /*introduce the alignments from the -method flag*/
3570 for (a=0; a<n_method_list; a++)
3572 sprintf (list_file[n_list++], "M%s",method_list[a]);
3574 /*introduce the alignments from the -library flag*/
3575 for (a=0; a<n_lib_file_list; a++)
3577 sprintf (list_file[n_list++], "L%s",lib_file_list[a]);
3579 /*introduce sequences from the exon_boundaries flag flag*/
3580 if ( exon_boundaries && exon_boundaries[0] && check_file_exists (exon_boundaries))
3585 //make sure boundaries do not get into the sequences*/
3586 ExS=main_read_seq (exon_boundaries);
3587 ExS=seq2clean_seq (ExS, "BOJboj");
3588 main_output_fasta_seq (tmpf=vtmpnam (NULL),ExA=seq2aln (ExS,NULL,RM_GAP), NO_HEADER);
3589 sprintf (list_file[n_list++], "S%s",tmpf);
3590 free_sequence (ExS, ExS->nseq);
3593 /*FETCH THE STRUCTURES INTRODUCED WITH -pdb and add them to -in*/
3596 for ( a=0; a< n_pdb; a++)
3598 if ( is_number (pdb_list[a]));
3601 pdb_start=pdb_end=0;
3602 if ( a+1< n_pdb && is_number (pdb_list[a+1]))pdb_start=atoi (pdb_list[a+1]);
3603 if ( a+2< n_pdb && is_number (pdb_list[a+2]))pdb_end=atoi (pdb_list[a+2]);
3605 pdb_name=get_pdb_struc ( pdb_list[a],pdb_start, pdb_end);
3606 if (pdb_name){sprintf (list_file[n_list++], "P%s", pdb_name);}
3607 /*Warning: do not free pdb_name: it is statically allocated by get_pdb_struc*/
3612 /*Check That Enough Methods/Libraries/Alignments Have been Chiped in*/
3617 nn=vcalloc ( 256, sizeof (int));
3618 for (a=0; a<n_list; a++)
3620 if ( !check_file_exists(list_file[a]))nn[(int)list_file[a][0]]++;
3623 if (is_seq (list_file[a]))nn['S']++;
3624 else if ( is_aln (list_file[a]))nn['A']++;
3625 else if ( is_lib (list_file[a]))nn['L']++;
3626 else if ( is_method (list_file[a]))nn['M']++;
3628 add_warning ( CL->local_stderr, "\nWARNING: File %s was not properly tag. Potential ambiguity\n",list_file[a]);
3633 if ( (nn['A']+nn['L']+nn['M'])==0)
3635 sprintf ( list_file[n_list++], "Mproba_pair"); //new default
3636 //sprintf ( list_file[n_list++], "Mlalign_id_pair");
3637 //sprintf ( list_file[n_list++], "Mslow_pair");
3642 /*FILL THE F STRUCTURE (Contains Information for Output names For the defaults)*/
3643 if (n_list==0 || argc<=1)
3645 fprintf ( stderr, "\nERROR: You have NOT provided enough arguments [FATAL:%s]", PROGRAM);
3646 myexit (EXIT_FAILURE);
3650 else if ( argv[1][0]!='-' && (check_file_exists( argv[1]) || check_file_exists(argv[1]+1)))
3652 if (check_file_exists(argv[1]))F=parse_fname(argv[1]);
3653 else if ( check_file_exists(argv[1]+1))F=parse_fname(argv[1]+1);
3659 if ( check_file_exists (infile))F=parse_fname(infile);
3660 else if (check_file_exists (infile+1))F =parse_fname(infile+1);
3665 for ( a=0; a< n_list; a++)
3667 if (!is_method(list_file[a]))
3671 if ( check_file_exists( list_file[a])){F=parse_fname(list_file[a]);break;}
3672 else if ( is_in_set ( list_file[a][0], "ASLX") && check_file_exists( list_file[a]+1)){F=parse_fname(list_file[a]+1);break;}
3673 else if ( is_in_set ( list_file[a][0], "R") && check_file_exists( list_file[a]+1))
3676 F=parse_fname(list_file[a]+1);
3677 sprintf ( lname, "%s_1", F->name);
3678 sprintf ( F->name, "%s", lname);
3682 else if ( is_in_set ( list_file[a][0], "P") && is_pdb_struc (list_file[a]+1))
3684 F=parse_fname(is_pdb_struc (list_file[a]+1));break;
3694 for ( a=0; a< n_list; a++)
3696 if ( list_file[a][0]=='P' && !check_file_exists(list_file[a]))
3699 sprintf(buf, "%s", list_file[a]+1);
3700 sprintf(list_file[a], "P%s",is_pdb_struc (buf));
3704 /*FATAL: NO SEQUENCES*/
3707 fprintf ( stderr, "\nERROR: You have not provided any sequence [FATAL:%s]\n",PROGRAM);
3708 myexit (EXIT_FAILURE);
3710 if (run_name)F=parse_fname(run_name);
3711 else F->path[0]='\0';
3714 identify_list_format (list_file, n_list);
3717 fprintf (le, "\nINPUT FILES\n");
3718 for ( a=0; a< n_list; a++)
3720 fprintf (le, "\tInput File (%c) %s ",list_file[a][0],list_file[a]+1);
3721 if ( list_file[a][0]=='A' || list_file[a][0]=='S' || list_file[a][0]=='P'|| list_file[a][0]=='R' )
3723 fprintf (le, " Format %s\n", f=identify_seq_format ( list_file[a]+1));
3725 if (!f || f[0]=='\0')
3727 fprintf ( stderr, "\nERROR: The format of %s is not supported[FATAL:%s]", list_file[a]+1,PROGRAM);
3728 myexit (EXIT_FAILURE);
3732 else fprintf (le, "\n");
3736 /*CONVERT, ALIGN OR EVALUATE: CHOSE THE RIGHT VERB*/
3737 /*Set the Hierarchy of the verbs*/
3738 /*The first one decides...*/
3741 do_list=vcalloc ( 100, sizeof (int*));
3743 do_list[n_do++]=&do_extended_matrix;
3744 do_list[n_do++]=&do_convert;
3745 do_list[n_do++]=&do_evaluate;
3746 do_list[n_do++]=&do_domain;
3747 do_list[n_do++]=&do_align;
3750 for ( a=0; a< n_do; a++)
3754 for ( b=0; b< n_do; b++)if ( b!=a)do_list[b][0]=0;
3761 /*SET THE DEFAULT NAMES*/
3764 if ( strm (tree_file, "default"))sprintf ( tree_file, "no");
3771 sprintf ( out_lib, "no");
3772 sprintf ( tree_file, "no");
3777 if ( F && strm ( tree_file, "default"))sprintf ( tree_file ,"%s%s.dnd",F->path ,F->name);
3778 if ( F && strm ( ph_tree_file, "default"))sprintf ( ph_tree_file ,"%s%s.ph",F->path ,F->name);
3780 for (a=0; a< n_out_aln_format; a++)
3782 if (is_out_format_list (out_aln_format[a]));
3785 fprintf (stderr, "\n%s is not a valid format [FATAL:%s]\n", out_aln_format[a], PROGRAM);
3786 myexit (EXIT_FAILURE);
3790 for (a=0; a<n_out_aln_format; a++)
3792 out_aln_format[a]=format_name2aln_format_name(out_aln_format[a]);
3795 if ( F && strm ( out_aln , "default"))
3797 for (a=0; a< n_out_aln_format; a++)
3800 sprintf ( tot_out_aln[a] ,"%s%s.%s" ,F->path,F->name,out_aln_format[a]);
3805 sprintf ( tot_out_aln[0], "%s", out_aln);
3806 for (a=1; a< n_out_aln_format; a++)
3807 sprintf ( tot_out_aln[a] ,"%s%s.%s", F->path ,out_aln, out_aln_format[a]);
3812 if ( F && strm ( out_lib , "default"))sprintf ( out_lib ,"%s%s.tc_lib",F->path , F->name);
3814 if ( type && type[0])
3816 if (strm2 (type,"Protein", "protein"))sprintf ( type, "PROTEIN");
3817 if (strm2 (type,"DNA", "dna"))sprintf ( type, "DNA");
3818 if (strm2 (type,"RNA", "rna"))sprintf ( type, "RNA");
3823 if ( !use_tree && check_file_exists (tree_file))vremove (tree_file);
3824 else if ( !use_tree || (use_tree && strm (use_tree, "default")));
3825 else sprintf ( tree_file, "%s", use_tree);
3827 /*******************************************************************************************************/
3829 /* Input Sequences and Library */
3831 /*******************************************************************************************************/
3833 set_methods_limits (method_limits,n_method_limits,list_file, n_list, &maxnseq, &maxlen);
3834 /*Set Global Values*/
3839 /*1 READ THE SEQUENCES*/
3840 S=read_seq_in_n_list (list_file, n_list, type,seq_source);
3843 if (!strm (S->type, get_array_type (S->nseq, S->seq)))
3845 fprintf ( stderr, "\nINCORRECT SEQUENCE TYPE (USE %s ONLY) [FATAL:%s]", S->type, PROGRAM);
3846 myexit (EXIT_FAILURE);
3850 if (S->nseq<=1 && !do_domain)
3852 printf_exit (EXIT_FAILURE,stderr, "\nERROR: Your Dataset Contains %d Sequence. For multiple alignments you need at least 2 sequences[FATAL:%s]", S->nseq,PROGRAM);
3855 store_seq_type (S->type);
3859 fprintf ( stdout, "%s", S->type);
3860 return EXIT_SUCCESS;
3862 /*Translate Sequences*/
3863 if ( transform && transform[0])
3865 S=transform_sequence (S, transform);
3868 /*Abort if the sequences are too long */
3869 if (maxlen!=-1 && S->max_len>maxlen)
3871 fprintf ( stderr, "\nSEQUENCES TOO LONG [Longuest=%d][MAX=%d][FATAL:%s]\n", S->max_len,maxlen, PROGRAM);
3872 myexit (EXIT_FAILURE);
3878 list_file=list_file2dpa_list_file (list_file,&n_list,maxnseq,S);
3879 S=read_seq_in_n_list (list_file, n_list, type,seq_source);
3881 else if ( maxnseq!=-1 && S->nseq>maxnseq)
3883 fprintf ( stderr, "\nTOO MANY SEQUENCES [N=%d][MAX=%d][FATAL:%s]\n", S->nseq,maxnseq, PROGRAM);
3884 myexit (EXIT_FAILURE);
3889 S=seq2template_seq(S, "SELF_S_",F);
3890 /* Get the Templates*/
3891 if ( n_template_file)
3893 fprintf ( le, "\nLooking For Sequence Templates:\n");
3894 for ( a=0; a< n_template_file; a++)
3896 //correct for missing extension modes
3897 if (strm (template_file_list[a],"RNA") && !strstr (extend_mode, "rna"))sprintf ( extend_mode, "rna2");
3900 fprintf ( le, "\n\tTemplate Type: [%s] Mode Or File: [%s] [Start", template_type2type_name(template_file_list[a]), template_file_list[a]);
3901 S=seq2template_seq(S, template_file_list[a], F);
3906 add_warning (stderr, "\nImpossible to find %s Templates\nCheck that your blast server is properly installed [See documentation][FATAL:%s]\n", template_file_list[a],PROGRAM);
3907 exit (EXIT_FAILURE);
3910 if (seq2n_X_template ( S, "_*_"))sprintf (S->template_file, "%s",seq2template_file (S, NULL));
3915 for ( a=0; a<S->nseq; a++)
3917 if ( seq_has_template ( S, a, "_P_"))ptf=1;
3922 sprintf ( S->template_file ,"%s%s.template_file",F->path , F->name);
3923 seq2template_file (S,S->template_file);
3924 display_output_filename ( stdout, "Template_List","fasta_seq", S->template_file, STORE);
3929 if (n_profile_template_file)
3931 fprintf ( le, "\nLooking For Profile Templates");
3932 for ( a=0; a< n_profile_template_file; a++)
3934 fprintf ( le, "\n\tTemplate Type: [%s] Mode Or File: [%s] [Start", template_type2type_name(profile_template_file_list[a]), profile_template_file_list[a]);
3935 S=profile_seq2template_seq(S, profile_template_file_list[a], F);
3939 add_warning(stderr, "Impossible to find %s Templates\nCheck that your blast server is properly installed [See documentation][FATAL:%s]\n",profile_template_file_list[a], PROGRAM);
3940 exit (EXIT_FAILURE);
3945 S=seq2template_type (S);
3946 le=display_sequences_names ( S, le, check_pdb_status, TEMPLATES);
3955 S=get_sequence_type (S);
3956 fprintf ( stdout , "%s\n", S->type);
3957 free_sequence(S, S->nseq);
3962 /*Reorder the sequences*/
3963 new_order=duplicate_char (S->name, -1, -1);
3964 if ( strm (inorder, "aligned"))new_order=sort_string_array (new_order, S->nseq);
3966 initial_order=duplicate_char (S->name, -1, -1);
3967 S=reorder_seq(S,new_order,S->nseq);
3968 free_char (new_order, -1);
3972 /*3 PREPARE THE CONSTRAINT LIST*/
3974 CL=declare_constraint_list ( S,NULL, NULL, 0,(strm(mem_mode, "disk"))?tmpfile():NULL, NULL);
3975 sprintf ( CL->method_evaluate_mode, "%s", method_evaluate_mode);
3976 (CL->TC)->use_seqan=use_seqan;
3977 CL->local_stderr=le;
3979 /*Estimate the distance Matrix*/
3980 CL->DM=cl2distance_matrix ( CL,NOALN,distance_matrix_mode, distance_matrix_sim_mode,1);
3982 /*one to all alignment*/
3983 if (one2all && one2all[0])prepare_one2all (one2all,S, lib_list);
3984 else if ( subset2all)
3986 prepare_subset2all (subset2all,S, lib_list,CL);
3989 if ( matrix && matrix[0])
3991 sprintf ( CL->method_matrix,"%s", matrix);
3994 /*Set the filtering*/
3995 CL->filter_lib=filter_lib;
3996 /*Set the evaluation Functions*/
3997 CL->profile_mode=get_profile_mode_function (profile_mode, NULL);
3998 sprintf ( CL->profile_comparison, "%s", profile_comparison);
3999 if ( n_struc_to_use)
4001 CL->STRUC_LIST=declare_sequence (1,1,n_struc_to_use);
4002 CL->STRUC_LIST->nseq=0;
4003 for ( a=0; a< n_struc_to_use; a++)
4006 sprintf ( (CL->STRUC_LIST)->name[(CL->STRUC_LIST)->nseq++],"%s",struc_to_use[a]);
4009 sprintf (CL->align_pdb_param_file, "%s", align_pdb_param_file);
4010 sprintf (CL->align_pdb_hasch_mode, "%s", align_pdb_hasch_mode);
4014 /*Blast Parameters*/
4015 (CL->Prot_Blast)->min_id=prot_min_sim;
4016 (CL->Prot_Blast)->max_id=prot_max_sim;
4017 (CL->Prot_Blast)->min_cov=prot_min_cov;
4018 sprintf ( (CL->Prot_Blast)->blast_server, "%s", prot_blast_server);
4019 sprintf ( (CL->Prot_Blast)->db, "%s", prot_db);
4021 (CL->Pdb_Blast)->min_id=pdb_min_sim;
4023 (CL->Pdb_Blast)->max_id=pdb_max_sim;
4024 (CL->Pdb_Blast)->min_cov=pdb_min_cov;
4025 sprintf ( (CL->Pdb_Blast)->blast_server, "%s", pdb_blast_server);
4026 sprintf ( (CL->Pdb_Blast)->db, "%s", pdb_db);
4027 CL->check_pdb_status=check_pdb_status;
4028 /*split parameters */
4030 CL->split_nseq_thres=split_nseq_thres;
4031 CL->split_score_thres=split_score_thres;
4033 (CL->DNA_Blast)->min_id=dna_min_sim;
4034 (CL->DNA_Blast)->max_id=dna_max_sim;
4035 (CL->DNA_Blast)->min_cov=dna_min_cov;
4036 sprintf ( (CL->DNA_Blast)->blast_server, "%s", dna_blast_server);
4037 sprintf ( (CL->DNA_Blast)->db, "%s", dna_db);
4042 if ( strm (method_log, "default"))
4044 sprintf ( CL->method_log, "%s%s.method_log",F->path, F->name);
4046 else if ( !strm (method_log, "no"))
4048 sprintf ( CL->method_log, "%s", method_log);
4050 set_string_variable ("method_log", method_log);
4054 CL->lalign_n_top=lalign_n_top;
4055 sprintf ( CL->multi_thread, "%s", multi_core);
4056 sprintf ( CL->lib_list, "%s", lib_list);
4057 sprintf (CL->rna_lib, "%s", rna_lib);
4058 /* Important: This is where the library is compiled!!!!*/
4060 if ((CL->S)->nseq>1 && !do_convert)
4062 CL=read_n_constraint_list (list_file,n_list,NULL, mem_mode,weight,type, le, CL, seq_source);
4065 else if ( do_convert && out_lib[0])
4068 {sprintf (list_file[0], "%s", name2type_name(infile));
4069 CL=read_n_constraint_list (list_file,1,NULL, mem_mode,weight,type, le, CL, seq_source);
4073 CL=read_n_constraint_list (list_file,n_list,NULL, mem_mode,weight,type, le, CL, seq_source);
4076 if ( CL->M)clean_aln=0;
4078 if ( is_number (weight))
4081 weight_value=atoi(weight);
4082 for (a=0; a<CL->ne; a++)
4084 vwrite_clist(CL, a, WE, weight_value);
4088 free_pair_wise ();//Free ststic memory allocated in some of the pairwise functions
4091 //Shrink: re-run slow_pair using the library, remove everything
4094 /*If the List is empty*/
4095 if ( (CL->S)->nseq>1 && CL->ne==0 && !CL->M &&!(do_convert && n_list>0))
4097 fprintf ( stderr, "\n******************ERROR*****************************************\n");
4099 fprintf ( stderr, "\nYou have not provided any method or enough Sequences[FATAL]");
4100 fprintf ( stderr, "\nIf you have used the '-in' Flag, ADD the methods you wish to use:");
4101 fprintf ( stderr, "\n\t-in <your sequences> Mlalign_id_pair Mfast_pair\n");
4102 fprintf ( stderr, "\nAnd make sure you provide at least TWO sequences\n");
4103 for ( a=0; a< argc; a++)fprintf ( stderr, "%s ", argv[a]);
4104 fprintf ( stderr, "\n*****************************************************************\n");
4105 myexit(EXIT_FAILURE);
4109 CL->normalise=do_normalise;
4111 if ( type && type[0])sprintf ( (CL->S)->type, "%s", type);
4112 CL->extend_jit=(do_extend>0)?1:0;
4114 CL->extend_threshold=(do_extend==1)?0:do_extend;
4115 CL->do_self=do_self;
4116 sprintf (CL->extend_clean_mode, "%s", clean_mode);
4117 sprintf (CL->extend_compact_mode, "%s", compact_mode);
4118 if ( CL->extend_jit && CL->extend_threshold !=0)filter_list (CL,0, CL->ne, CL->extend_threshold);
4119 CL->pw_parameters_set=1;
4123 CL->nomatch=nomatch;
4124 set_int_variable ("nomatch", nomatch);
4126 if ( !gep && !gop && CL->M)
4128 CL->gop=get_avg_matrix_mm ( CL->M, (strm3((CL->S)->type,"PROTEIN", "Protein", "protein")?AA_ALPHABET:"gcuta"))*10;
4130 fprintf ( CL->local_stderr, "\nAUTOMATIC PENALTIES: gapopen=%d gapext=%d", CL->gop, CL->gep);
4132 else if ( !CL->M && cosmetic_penalty && !gep && !gop)
4135 CL->gop=cosmetic_penalty;
4141 fprintf ( CL->local_stderr, "\nMANUAL PENALTIES: gapopen=%d gapext=%d", CL->gop, CL->gep);
4149 CL->maximise=maximise;
4151 if (strm(retrieve_seq_type(),"DNA")|| strm(retrieve_seq_type(),"RNA") )
4152 CL->ktup=MAX(2,ktup);
4156 CL->use_fragments=diag_mode;
4157 CL->fasta_step=fasta_step;
4158 CL->diagonal_threshold=diag_threshold;
4160 sprintf ( CL->matrix_for_aa_group, "%s", sim_matrix);
4161 sprintf ( CL->dp_mode, "%s", dp_mode);
4162 CL->TG_MODE=tg_mode;
4164 sprintf ( CL->evaluate_mode, "%s", evaluate_mode);
4165 fprintf (le, "\n\n\tLibrary Total Size: [%d]\n", CL->ne);
4168 CL=choose_extension_mode (extend_mode, CL);
4169 CL->max_n_pair=max_n_pair;
4172 if (CL->ne>0 && out_lib[0]!='\0' && !strm (out_lib, "no"))
4175 if (strstr (out_lib_mode, "extended"))
4179 //Do the processing before saving the extended lib*/
4181 if ( filter_lib) CL=filter_constraint_list (CL,CL->weight_field, filter_lib);
4182 for (a=0; a<relax_lib; a++)CL=relax_constraint_list (CL);
4183 for (a=0; a<shrink_lib; a++)CL=shrink_constraint_list (CL);
4184 sprintf ( emode, "lib_%s", out_lib_mode);
4186 OUT=vfopen (out_lib, "w");
4187 OUT=save_extended_constraint_list(CL,emode,OUT);
4191 OUT=save_constraint_list ( CL, 0, CL->ne, out_lib, NULL, "ascii",CL->S);
4194 CL->local_stderr=display_output_filename (le, "TCLIB","tc_lib_format_01",out_lib, CHECK);
4198 check for the connectivity of the constraint list
4199 if ( !constraint_list_is_connected (CL))
4201 add_warning ( stderr, "ERROR: unconnected sequences in the constraint_list [FATAL:%s]\n", PROGRAM);
4202 myexit (EXIT_FAILURE);
4205 if ( lib_only)return EXIT_SUCCESS;
4210 if ( filter_lib) CL=filter_constraint_list (CL,CL->weight_field, filter_lib);
4211 for (a=0; a<relax_lib; a++)CL=relax_constraint_list (CL);
4212 for (a=0; a<shrink_lib; a++)CL=shrink_constraint_list (CL);
4215 sprintf ( CL->distance_matrix_mode, "%s", distance_matrix_mode);
4216 sprintf ( CL->distance_matrix_sim_mode, "%s", distance_matrix_sim_mode);
4218 sprintf ( CL->tree_mode, "%s", tree_mode);
4219 //Re-estim�ate the distance matrix with consistency//
4220 if ( strm ("cscore", distance_matrix_mode))
4222 CL->DM=cl2distance_matrix ( CL,NOALN,distance_matrix_mode, distance_matrix_sim_mode,1);
4224 /*WEIGHT CONSTRAINT LIST*/
4229 CL->DM=cl2distance_matrix (CL, NOALN, NULL, NULL,0);
4231 CL=weight_constraint_list(CL, seq_weight);
4233 if (output_seq_weights (CL->W, outseqweight))
4234 CL->local_stderr=display_output_filename( CL->local_stderr,"WEIGHT","tc_weight",outseqweight, CHECK);
4235 le=display_weights(CL->W, le);
4240 /*Prepare quadruplets*/
4241 if ( nseq_for_quadruplet && !strm(seq_name_for_quadruplet[0], "all"))
4243 CL->nseq_for_quadruplet=nseq_for_quadruplet;
4244 CL->seq_for_quadruplet=vcalloc ((CL->S)->nseq, sizeof (int));
4245 for (a=0; a< CL->nseq_for_quadruplet; a++)
4247 printf ( "\nquad: %s", seq_name_for_quadruplet[a]);
4248 if ( (b=name_is_in_list (seq_name_for_quadruplet[a],(CL->S)->name,(CL->S)->nseq, 100))!=-1)CL->seq_for_quadruplet[b]=1;
4249 else add_warning ( stderr, "\nWARNING: Sequence %s is not in the set and cannot be used for quadruplet extension\n",seq_name_for_quadruplet[a]);
4252 else if ( nseq_for_quadruplet && strm(seq_name_for_quadruplet[0], "all"))
4255 CL->nseq_for_quadruplet=(CL->S)->nseq;
4256 CL->seq_for_quadruplet=vcalloc ((CL->S)->nseq, sizeof (int));
4257 for (a=0; a< CL->nseq_for_quadruplet; a++)
4259 CL->seq_for_quadruplet[a]=1;
4263 /*******************************************************************************************************/
4265 /* Prepare The Alignment */
4267 /*******************************************************************************************************/
4271 A=seq2aln ((CL->S),NULL,1);
4272 ungap_array(A->seq_al,A->nseq);
4274 /*Chose the right Mode for evaluating Columns*/
4277 else if ( strm ( msa_mode, "seq_aln"))
4279 A=seq_aln (A,(CL->S)->nseq, CL);
4281 else if ( strm ( msa_mode, "sorted_aln"))
4283 A=sorted_aln (A, CL);
4285 else if ( strm ( msa_mode, "full_sorted_aln"))
4287 full_sorted_aln (A, CL);
4288 output_constraints (out_lib, "sim", A);
4289 CL->local_stderr=display_output_filename (le, "TCLIB","tc_lib_format_01",out_lib, CHECK);
4290 return EXIT_SUCCESS;
4293 else if ( strm ( msa_mode, "profile_aln"))
4295 A=iterative_tree_aln (A, 0, CL);
4296 A=profile_aln (A, CL);
4298 else if ( strm ( msa_mode, "iterative_aln"))
4300 A=iterative_tree_aln (A, 0, CL);
4301 A=iterative_aln (A,10, CL);
4303 else if ( strm ( msa_mode, "iterative_tree_aln"))
4305 A=iterative_tree_aln (A,1, CL);
4307 else if ( strm ( msa_mode, "dpa_aln"))
4311 else if ( strm ( msa_mode, "new_dpa_aln"))
4313 A=new_dpa_aln (A, CL);
4315 else if ( strm ( msa_mode, "delayed_tree_aln"))
4317 A=make_delayed_tree_aln (A,2, CL);
4319 else if ( strm ( msa_mode, "groups"))
4321 A=seq2aln_group (A,dpa_maxnseq, CL);
4322 out_aln_format[0]="conc_aln";
4325 else if ( strm ( msa_mode, "upgma"))
4327 A=upgma_tree_aln (A, A->nseq, CL);
4329 else if ( strm ( msa_mode, "graph"))
4331 fprintf ( stderr, "\nDO GRAPH ALIGNMENT");
4332 A=graph_aln ( A, CL, (CL->S));
4334 else if ( strm ( msa_mode, "tsp"))
4336 fprintf ( stderr, "\nDO TSP ALIGNMENT");
4337 A=tsp_aln ( A, CL, (CL->S));
4339 else if ( strm ( msa_mode, "precomputed"))
4341 if (infile[0]) {free_aln (A);A=main_read_aln ( infile, declare_aln(CL->S));}
4342 else{fprintf ( stderr, "\nERROR: distance_matrix_mode=aln requires an aln passed via the -infile flag [FATAL:%s]", PROGRAM);crash ("");}
4344 sprintf ( CL->dp_mode, "precomputed_pair_wise");
4345 sprintf ( CL->distance_matrix_mode, "aln");
4346 CL->tree_aln=A=reorder_aln ( A, (CL->S)->name,(CL->S)->nseq);
4349 if ( strm (tree_file, "default") || !check_file_exists (tree_file))
4350 T=make_tree ( A,CL,gop, gep,(CL->S),pc, maximise);
4351 else if ( strm (tree_file, "no"))
4352 T=make_tree ( A,CL,gop, gep,(CL->S),NULL, maximise);
4355 T=read_tree (pc,&tot_node,(CL->S)->nseq, (CL->S)->name);
4358 SNL=tree_aln ((T[3][0])->left,(T[3][0])->right,A,(CL->S)->nseq, CL);
4360 else if ( strm ( msa_mode, "tree"))
4362 if ( strm (CL->distance_matrix_mode, "aln"))
4364 if (infile[0]) {free_aln (A);A=main_read_aln ( infile, declare_aln(CL->S));}
4365 else{fprintf ( stderr, "\nERROR: distance_matrix_mode=aln requires an aln passed via the -infile flag [FATAL:%s]", PROGRAM);crash ("");}
4369 if ( strm (tree_file, "default") || !check_file_exists (tree_file))
4370 T=make_tree ( A,CL,gop, gep,(CL->S),pc,maximise);
4371 else if ( strm (tree_file, "no"))
4372 T=make_tree ( A,CL,gop, gep,(CL->S),NULL, maximise);
4375 fprintf ( le, "\nREAD PRECOMPUTED TREE: %s\n", pc);
4376 T=read_tree (pc,&tot_node,(CL->S)->nseq, (CL->S)->name);
4378 SNL=tree_aln ((T[3][0])->left,(T[3][0])->right,A,(CL->S)->nseq, CL);
4379 A->nseq=(CL->S)->nseq;
4384 fprintf ( stderr, "\nERROR: msa_mode %s is unknown [%s:FATAL]\n", msa_mode, PROGRAM);
4389 else if ( (do_evaluate || do_convert))
4393 A=(infile[0])?main_read_aln ( infile, declare_aln(CL->S)):NULL;
4395 if (!A)A=seq2aln((CL->S), NULL,0);
4399 A->nseq=(CL->S)->nseq;
4407 CL->moca=vcalloc ( 1, sizeof ( Moca));
4408 if (strm ( "cfasta_pair_wise", dp_mode))sprintf (CL->dp_mode, "%s","domain_pair_wise");
4409 (CL->moca)->moca_start=domain_start;
4410 (CL->moca)->moca_len =domain_len;
4411 (CL->moca)->moca_scale=(domain_scale==0)?-(CL->normalise/20):domain_scale;
4412 (CL->moca)->moca_interactive=domain_interactive;
4416 if (!cosmetic_penalty && !gep && !gop)
4422 CL=prepare_cl_for_moca (CL);
4423 aln_list=moca_aln (CL);
4424 free_int ( CL->packed_seq_lu, -1);
4425 CL->packed_seq_lu=NULL;
4428 while ( aln_list[a])
4430 for ( b=0; b< n_out_aln_format; b++)
4433 output_format_aln (out_aln_format[b],aln_list[a],EA=fast_coffee_evaluate_output(aln_list[a], CL), tot_out_aln[b]);
4434 le=display_output_filename( le,"MSA",out_aln_format[b], tot_out_aln[b], CHECK);
4438 return EXIT_SUCCESS;
4440 else if ( do_extended_matrix)
4442 A=seq2aln(CL->S, NULL, 1);
4444 for ( a=0; a< n_out_aln_format; a++)
4446 output_format_aln (out_aln_format[a],A,EA, tot_out_aln[a]);
4447 le=display_output_filename( le,"MSA",out_aln_format[a], tot_out_aln[a], CHECK);
4450 return EXIT_SUCCESS;
4454 /*******************************************************************************************************/
4456 /* PREPARE THE ALIGNMENT FOR OUTPUT */
4458 /*******************************************************************************************************/
4463 for ( a=0; a< A->nseq; a++)
4465 for ( b=0; b< A->len_aln ; b++)
4466 if ( A->seq_al[a][b]=='O' || A->seq_al[a][b]=='o')A->seq_al[a][b]='-';
4473 if ( check_file_exists(outorder))
4476 OS=get_fasta_sequence (outorder, NULL);
4477 if ( prf_in_seq (CL->S))A->expanded_order=OS->name;
4478 else A=reorder_aln ( A,OS->name,A->nseq);
4480 else if ( strm(outorder, "aligned") && T)
4482 A=reorder_aln ( A,A->tree_order,A->nseq);
4488 A=reorder_aln ( A, (CL->S)->name,(CL->S)->nseq);
4489 A=reorder_aln ( A, initial_order,(CL->S)->nseq);
4493 A->output_res_num=strm3 ( output_res_num, "on", "On", "ON");
4495 if ( strm2 (residue_case, "keep", "retain"))A->residue_case=KEEP_CASE;
4496 else if (strm3 (residue_case, "upper", "Upper", "UPPER"))A->residue_case=UPPER_CASE;
4497 else if (strm3 (residue_case, "lower", "Lower", "LOWER"))A->residue_case=LOWER_CASE;
4498 else A->residue_case=1;
4507 A=iterate_aln (A, iterate, CL);
4513 EA=main_coffee_evaluate_output(A, CL,clean_evaluate_mode);
4514 A=clean_maln(A, EA,clean_threshold,clean_iteration);
4523 over_aln_tmp=vtmpnam(NULL);
4524 output_format_aln ("overaln", A, NULL, over_aln_tmp);
4525 A=main_read_aln (over_aln_tmp,A);
4528 EA=main_coffee_evaluate_output(A, CL, evaluate_mode);
4530 //correct ascii file
4533 EA=overlay_alignment_evaluation (A,EA);
4538 if (!strm2(out_aln, "stdout", "stderr") && le==stderr && !do_convert)output_format_aln ("aln",A,NULL,"stdout");
4542 for ( a=0; a< n_out_aln_format; a++)
4543 if ( !strstr ( out_aln_format[a], "expand"))output_format_aln (out_aln_format[a],A,EA, tot_out_aln[a]);
4544 for ( a=0; a< n_out_aln_format; a++)
4545 if ( strstr (out_aln_format[a], "expand"))output_format_aln (out_aln_format[a],A,EA, tot_out_aln[a]);
4549 fprintf (le, "\n\nOUTPUT RESULTS");
4550 le=display_output_filename (le, "GUIDE_TREE","newick", tree_file, CHECK);
4552 for ( a=0; a< n_out_aln_format; a++)
4553 le=display_output_filename( le,"MSA",out_aln_format[a], tot_out_aln[a], CHECK);
4555 if (!strm (ph_tree_file, "NO") && A->nseq>2)
4560 tmode=declare_char (2, 100);
4561 sprintf (tmode[0], "nj");
4562 T=tree_compute (A, 1, tmode);
4563 tfp=vfopen (ph_tree_file, "w");
4564 tfp=print_tree (T, "newick", tfp);
4566 le=display_output_filename (le, "PHYLOGENIC_TREE","newick", ph_tree_file, CHECK);
4574 if (trim && n_seq_to_keep)
4576 if (n_seq_to_keep==1 && check_file_exists (seq_to_keep[0]))
4579 SEQ_TO_KEEP=read_sequences (seq_to_keep[0]);
4584 SEQ_TO_KEEP=declare_sequence ( 1, 1,n_seq_to_keep);
4585 for ( a=0; a< n_seq_to_keep; a++)sprintf ( SEQ_TO_KEEP->name[a], "%s", seq_to_keep[a]);
4589 sprintf ( CL->dp_mode, "precomputed_pair_wise");
4590 sprintf ( CL->distance_matrix_mode, "aln");
4594 CL->tree_aln=A=reorder_aln ( A, (CL->S)->name,(CL->S)->nseq);
4601 if ( strm (tree_file, "default") || !check_file_exists (tree_file))
4602 T=make_tree ( A,CL,gop, gep,(CL->S),pc, maximise);
4603 else if ( strm (tree_file, "no"))
4604 T=make_tree ( A,CL,gop, gep,(CL->S),NULL, maximise);
4607 T=read_tree (pc,&tot_node,(CL->S)->nseq, (CL->S)->name);
4611 SNL=tree_aln ((T[3][0])->left,(T[3][0])->right,A,(CL->S)->nseq, CL);
4614 for ( a=0, b=0; a<A->nseq; a++)b+=(SNL[a])?1:0;
4615 fprintf ( le, "\n\nSPLIT DATASET: %d Groups\n", b);
4616 /*Display Group Names*/
4618 if ( trim && SEQ_TO_KEEP)
4620 for ( a=0; a< SEQ_TO_KEEP->nseq; a++)
4623 trim_subS=extract_one_seq(SEQ_TO_KEEP->name[a],0,0,A,KEEP_NAME);
4624 trim_S=add_sequence (trim_subS,trim_S,0);
4627 for ( a=0, b=0; a<A->nseq; a++)
4633 fprintf ( le, "\n\tSPLIT_GROUP %d ; Nseq %d ; Score %d ; List ",b, (SNL[a])->nseq, (int)(SNL[a])->score);
4634 for ( c=0; c< (SNL[a])->nseq; c++)
4636 fprintf ( le, "%s ",(CL->S)->name[(SNL[a])->lseq[c]]);
4639 SPLIT_ALN=extract_sub_aln (A, (SNL[a])->nseq,(SNL[a])->lseq);
4641 ungap_aln (SPLIT_ALN);
4645 sprintf ( split_format, "%s", "clustalw");
4646 sprintf ( split_name, "%s.split.%d.%s", F->name, b,split_format);
4647 fprintf ( le, " ; File %s", split_name);
4648 output_format_aln (split_format,SPLIT_ALN,NULL,split_name);
4649 le=display_output_filename( le,"SPLIT_SEQ",split_format,split_name, CHECK);
4653 t=aln2most_similar_sequence(SPLIT_ALN, "idmat");
4654 trim_subS=extract_one_seq(SPLIT_ALN->name[t],0,0,SPLIT_ALN,KEEP_NAME);
4655 trim_S=add_sequence (trim_subS,trim_S,0);
4656 fprintf ( le, "\n\tTRIM_SEQ: Kept sequence %s",SPLIT_ALN->name[t]);
4658 free_aln (SPLIT_ALN);
4667 SPLIT_ALN=seq2aln (trim_S,NULL, KEEP_GAP);
4668 ungap_aln (SPLIT_ALN);
4669 sprintf ( trim_format, "%s", "fasta_aln");
4670 if ( strm (trimfile, "default"))sprintf ( trimfile, "%s.trim.%s", F->name,trim_format);
4672 output_format_aln (trim_format,SPLIT_ALN,NULL,trimfile);
4673 le=display_output_filename( le,"TRIM_SEQ",trim_format,trimfile, CHECK);
4677 if (remove_template_file){S=vremove_seq_template_files(S);}
4680 S=display_seq_template_files (S);
4683 //fLUSH OUT THE NAME OF ALL THE FILES THAT HAVE BEEN PRODUCED
4684 le=display_output_filename (le, NULL, NULL, NULL, FLUSH);
4687 fprintf (le, "\n\n");
4689 free_char (list_file, -1);
4691 free_Alignment (EA);
4694 S=free_constraint_list (CL);
4695 free_sequence (S, S->nseq);
4703 le=t_coffee_tip (le, tip);
4704 le=print_command_line ( le);
4705 le=print_mem_usage (le, PROGRAM);
4706 le=print_cpu_usage(le, PROGRAM);
4707 le=print_program_information (le, NULL);
4710 if (full_log && full_log[0])log_function(full_log);
4712 return EXIT_SUCCESS;
4715 /*Specialized set of Parameters*/
4716 char *get_defaults (char *buf, char *type)
4720 char *get_precomputed_defaults(char *buf, char *type)
4723 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4725 buf=strcat (buf," -msa_mode=precomputed ");
4726 buf=strcat (buf," -seq_weight=no ");
4727 buf=strcat (buf," -evaluate_mode no ");
4728 buf=strcat (buf," -in Xpam250mt ");
4731 char *get_evaluate_defaults(char *buf, char *type)
4734 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4736 buf=strcat (buf," -quiet=stdout ");
4737 /*buf=strcat (buf," -seq_weight=no ");*/
4738 buf=strcat (buf," -output score_ascii html ");
4739 buf=strcat (buf," -iterate 0 ");
4741 buf=strcat (buf," -evaluate ");
4747 char *get_genome_defaults(char *buf, char *type)
4750 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4752 buf=strcat (buf," -seq_weight=no ");
4753 buf=strcat (buf," -dp_mode sim_pair_wise_lalign ");
4754 buf=strcat (buf," -output glalign ");
4755 buf=strcat (buf," -iterate 0 ");
4756 buf=strcat (buf," -distance_matrix_mode ktup ");
4757 buf=strcat (buf," -evaluate_mode t_coffee_slow ");
4758 buf=strcat (buf," -gapopen 100 -gapext 20 -nomatch 30 ");
4759 buf=strcat (buf," -clean_aln 0 ");
4760 buf=strcat (buf,"-output clustalw,score_ascii ");
4765 char *get_dali_defaults(char *buf, char *type)
4768 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4770 buf=strcat (buf,"-cosmetic_penalty=-50 ");
4771 buf=strcat (buf,"-distance_matrix_mode=slow ");
4772 buf=strcat (buf,"-output clustalw,score_ascii ");
4773 buf=strcat (buf,"-evaluate_mode=non_extended_t_coffee ");
4774 buf=strcat (buf,"-clean_aln 0 ");
4779 char *get_very_fast_defaults(char *buf, char *type)
4781 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4783 buf=strcat (buf,"-in Xblosum62mt ");
4784 buf=strcat (buf,"-distance_matrix_mode ktup ");
4785 buf=strcat (buf,"-maxnseq 10000 ");
4786 buf=strcat (buf,"-dpa_maxnseq 0 ");
4787 buf=strcat (buf,"-dp_mode fasta_pair_wise ");
4788 buf=strcat (buf,"-extend_mode matrix ");
4789 buf=strcat (buf,"-gapopen -10 ");
4790 buf=strcat (buf,"-gapext -1 ");
4791 buf=strcat (buf,"-iterate 0 ");
4792 /*buf=strcat (buf,"-in ");*/
4797 char *get_low_memory_defaults(char *buf, char *type)
4799 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4801 if (NO_METHODS_IN_CL)buf=strcat (buf,"-distance_matrix_mode=idscore -method lalign_id_pair slow_pair -dp_mode=linked_pair_wise ");
4802 else buf=strcat (buf,"-distance_matrix_mode=idscore -dp_mode=linked_pair_wise ");
4805 char *get_dna_defaults(char *buf, char *type)
4810 char *get_cdna_defaults(char *buf, char *type)
4812 buf=strcat (buf,"-distance_matrix_mode=idscore -dp_mode=fasta_cdna_pair_wise ");
4815 char *get_3dcoffee_defaults(char *buf, char *type)
4817 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4819 buf=strcat (buf,"-in Msap_pair -template_file SELF_P_ ");
4820 /*buf=strcat (buf,"-in ");*/
4824 char *get_expresso_defaults(char *buf, char *type)
4827 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4829 buf=strcat (buf,"-in Msap_pair -template_file EXPRESSO");
4831 /*buf=strcat (buf,"-in ");*/
4835 char *get_psicoffee_defaults(char *buf, char *type)
4838 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4840 buf=strcat (buf,"-in Mproba_pair -template_file BLAST ");
4841 /*buf=strcat (buf,"-in ");*/
4845 char *get_accurate_defaults ( char *buf, char *type)
4848 if ( strm (type, "PROTEIN")) return get_accurate4PROTEIN_defaults(buf, type);
4849 else if ( strm (type, "DNA")) return get_accurate4DNA_defaults(buf, type);
4850 else if ( strm (type, "RNA")) return get_accurate4RNA_defaults(buf, type);
4851 else return get_defaults(buf, type);
4853 char *get_accurate4PROTEIN_defaults(char *buf, char *type)
4855 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4856 if (NO_METHODS_IN_CL)buf=strcat (buf,"-in Mbest_pair4prot -template_file BLAST -template_file EXPRESSO ");
4857 else buf=strcat (buf,"-template_file BLAST -template_file EXPRESSO ");
4858 buf=strcat (buf,"-output aln, expanded_fasta_aln ");
4866 char *get_accurate4DNA_defaults(char *buf, char *type)
4868 return get_low_memory_defaults (buf,type);
4870 char *get_accurate4RNA_defaults(char *buf, char *type)
4872 return get_rcoffee_defaults (buf,type);
4874 char *get_t_coffee_defaults(char *buf, char *type)
4878 char *get_fmcoffee_defaults(char *buf, char *type)
4881 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4883 if (NO_METHODS_IN_CL) buf=strcat (buf,"-in Mclustalw2_msa Mmuscle_msa Mmafft_msa -multi_core methods_relax_msa");
4885 /*buf=strcat (buf,"-in ");*/
4890 char *get_mcoffee_defaults(char *buf, char *type)
4893 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4896 if (NO_METHODS_IN_CL) buf=strcat (buf,"-in Mclustalw2_msa Mt_coffee_msa Mpoa_msa Mmuscle_msa Mmafft_msa Mdialignt_msa Mpcma_msa Mprobcons_msa -multi_core methods_relax_msa ");
4897 /*buf=strcat (buf,"-in ");*/
4900 char *get_dmcoffee_defaults(char *buf, char *type)
4903 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4905 if (NO_METHODS_IN_CL)buf=strcat (buf,"-in Mkalign_msa Mt_coffee_msa Mpoa_msa Mmuscle_msa Mmafft_msa Mdialignt_msa Mprobcons_msa Mamap_msa -multi_core methods_relax_msa");
4906 /*buf=strcat (buf,"-in ");*/
4910 char *get_rcoffee_consan_defaults(char *buf, char *type)
4913 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4915 check_program_is_installed (RNAPLFOLD_4_TCOFFEE,NULL, NULL,RNAPLFOLD_ADDRESS, INSTALL_OR_DIE);
4916 if (NO_METHODS_IN_CL)buf=strcat (buf,"-in Mconsan_pair -dp_mode myers_miller_pair_wise -extend_mode rna2 -template_file RCOFFEE -transform dna2rna -type DNA -relax_lib 0");
4917 else buf=strcat (buf,"-dp_mode myers_miller_pair_wise -extend_mode rna2 -template_file RCOFFEE -transform dna2rna -type DNA -relax_lib 0");
4918 /*buf=strcat (buf,"-in ");*/
4922 char *get_rmcoffee_defaults(char *buf, char *type)
4925 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4927 check_program_is_installed (RNAPLFOLD_4_TCOFFEE,NULL, NULL,RNAPLFOLD_ADDRESS, INSTALL_OR_DIE);
4928 if (NO_METHODS_IN_CL)buf=strcat (buf,"-in Mprobcons_msa Mmafft_msa Mmuscle_msa -extend_mode rna2 -template_file RCOFFEE -transform dna2rna -check_type -type DNA -relax_lib 0");
4929 else buf=strcat (buf,"-extend_mode rna2 -template_file RCOFFEE -transform dna2rna -check_type -type DNA -relax_lib 0");
4930 /*buf=strcat (buf,"-in ");*/
4934 char *get_rmcoffee_defaults_old(char *buf, char *type)
4937 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4939 check_program_is_installed (RNAPLFOLD_4_TCOFFEE,NULL, NULL,RNAPLFOLD_ADDRESS, INSTALL_OR_DIE);
4940 buf=strcat (buf,"-in Mprobcons_msa Mmafft_msa Mmuscle_msa -dp_mode myers_miller_pair_wise -extend_mode rna2 -template_file RCOFFEE -transform dna2rna -check_type -type DNA -relax_lib 0");
4941 /*buf=strcat (buf,"-in ");*/
4946 // if (NO_METHODS_IN_CL)buf=strcat (buf,"-in Mbest_pair4prot -template_file BLAST -template_file EXPRESSO ");
4947 char *get_best4RNA_defaults(char *buf, char *type)
4950 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4952 check_program_is_installed (RNAPLFOLD_4_TCOFFEE,NULL, NULL,RNAPLFOLD_ADDRESS, INSTALL_OR_DIE);
4953 buf=strcat (buf," -extend_mode rna2 -template_file PDB,RNA -in Mbest_pair4rna");
4954 /*buf=strcat (buf,"-in ");*/
4959 char *get_rcoffee_defaults(char *buf, char *type)
4962 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4964 check_program_is_installed (RNAPLFOLD_4_TCOFFEE,NULL, NULL,RNAPLFOLD_ADDRESS, INSTALL_OR_DIE);
4965 buf=strcat (buf," -extend_mode rna2 -template_file RCOFFEE -transform dna2rna -check_type -type DNA -relax_lib 0");
4966 /*buf=strcat (buf,"-in ");*/
4970 char *get_rcoffee_defaults_old(char *buf, char *type)
4973 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4975 check_program_is_installed (RNAPLFOLD_4_TCOFFEE,NULL, NULL,RNAPLFOLD_ADDRESS, INSTALL_OR_DIE);
4976 buf=strcat (buf,"-dp_mode myers_miller_pair_wise -extend_mode rna2 -template_file RCOFFEE -transform dna2rna -check_type -type DNA -relax_lib 0");
4977 /*buf=strcat (buf,"-in ");*/
4982 char *get_repeat_defaults(char *buf, char *type)
4985 if (buf==NULL)buf=vcalloc (1000, sizeof (char));
4987 buf=strcat (buf,"-in slow_pair -matrix idmat -out_lib -profile_comparison profile -profile_mode channel_profile_profile -dp_mode myers_miller_pair_wise ");
4988 /*buf=strcat (buf,"-in ");*/
4993 int check_configuration4program()
4999 /*Chose the right Mode for comparing residues*/
5006 c2=vcalloc ( 100, sizeof (char));
5008 sprintf (command, "cat hmgt_mouseVsnrl3d.blast_result |blast_aln2fasta_aln.pl | fasta_aln2fasta_aln_unique_name.pl > my_test");
5010 fprintf ( stderr, "C1: %d, C2:%d", is_dynamic_memory (c2), is_dynamic_memory (c2));
5016 int run_other_pg ( int argc, char *argv[])
5018 //make minimum initialization
5019 get_t_coffee_environement (NULL);
5020 if ( strm (argv[0], "seq_reformat") || strm (argv[0], "saltt"))
5022 return seq_reformat (argc, argv);
5024 else if ( strm (argv[0], "aln_compare"))
5026 return aln_compare (argc, argv);
5028 else if ( strm (argv[0], "analyse_pdb") || strm (argv[0], "apdb") || strm (argv[0], "irmsd") || strm (argv[0], "trmsd"))
5030 return apdb ( argc, argv);
5032 else if ( strm (argv[0], "quantile"))
5034 return quantile ( argc, argv);
5036 else if ( strstr ( argv[0], "unpack_"))
5038 unpack_all_perl_script (argv[0]+strlen ("unpack_"));
5040 else if ( strstr ( argv[0], "fastal"))
5042 return fastal(argc, argv);
5046 return my_system_cl (argc, argv);
5048 return EXIT_FAILURE;
5051 FILE * t_coffee_tip (FILE *fp,char *mode)
5058 tip=declare_char ( 100, 300);
5059 sprintf ( tip[n++],"Get the most accurate protein alignments with: t_coffee <yourseq> -special_mode accurate [Slow]\n");
5060 sprintf ( tip[n++],"Change the Width of your MSA with the environement variable ALN_LINE_LENGTH (all formats)");
5061 sprintf ( tip[n++],"Align 2 or more profiles with -profiles= aln1, aln2");
5062 sprintf ( tip[n++],"-special_mode=expresso to fetch your structures automatically");
5063 sprintf ( tip[n++],"-special_mode=psicoffee to expand your sequences");
5064 sprintf ( tip[n++],"-special_mode=accurate The best we can do [slow]");
5066 sprintf ( tip[n++],"-special_mode=3dcoffee to combine sequences and structures");
5067 sprintf ( tip[n++],"-special_mode=mcoffee to combine alternative msa methods");
5068 sprintf ( tip[n++],"-special_mode=dmcoffee to combine alternative msa methods on debian");
5070 sprintf ( tip[n++],"-usetree=<file> to use your own guide tree");
5071 sprintf ( tip[n++],"-infile=<aln> -special_mode=evaluate to evaluate your own alignment");
5072 sprintf ( tip[n++],"-other_pg seq_reformat to access seq_reformat");
5073 sprintf ( tip[n++],"-other_pg extract_from_pdb to use our pdb retriever");
5074 sprintf ( tip[n++],"All the latest versions on www.tcoffee.org");
5075 sprintf ( tip[n++],"-version to check for updates");
5076 sprintf ( tip[n++],"-output=html will produce a colored output");
5077 sprintf ( tip[n++],"-outorder=aligned will order the sequences according to the guide tree in newick");
5078 sprintf ( tip[n++],"-special_mode=quickaln will produce fast/low accuracy alignments");
5079 sprintf ( tip[n++],"-other_pg seq_reformat -in <aln> -action +trim %%50 Will reduce the redundancy of your MSA");
5080 sprintf ( tip[n++],"-tip=all to see all the tips, tip=no will prevent them all");
5081 sprintf ( tip[n++],"-other_pg unpack_all will unpack all the perl scripts within t_coffee");
5084 if ( strm (mode, "none"))return fp;
5086 fprintf ( fp, "\n# TIP :See The Full Documentation on www.tcoffee.org\n");
5088 if (strm ( mode, "all"))
5090 for ( a=0; a< n; a++)
5092 fprintf (fp, "# TIP %d: %s\n", a+1,tip[a]);
5095 else if ( strm ( mode, "one"))
5100 fprintf (fp, "# TIP %2s: %s","1", tip[0]);
5101 fprintf (fp, "# TIP %2d: %s\n", b+1, tip[b]);
5105 fprintf ( fp, "\n");
5109 char* prepare_one2all (char *seq,Sequence *S, char *lib_file)
5113 char **name, *use_tree;
5116 if ( S->nseq==2) return NULL;
5119 if ((i=name_is_in_list (seq,S->name,S->nseq, 100))!=-1);
5120 else if ( is_number (seq))
5126 declare_name (use_tree);
5129 name=declare_char (S->nseq+1, 100);
5130 for (a=0; a<S->nseq; a++)
5131 sprintf (name[a], "%s", S->name[a]);
5136 sprintf (name[n], "%s", name[i]);
5137 sprintf (name[i], "%s", name[0]);
5138 sprintf (name[0], "%s", name[n]);
5140 sprintf (lib_file, "%s", vtmpnam (NULL));
5141 fp=vfopen (lib_file, "w");
5142 for ( a=1; a<n; a++)
5144 fprintf ( fp, "2 %s %s\n", name[0],name[a]);
5149 sprintf ( use_tree, "%s", vtmpnam (NULL));
5150 fp=vfopen (use_tree, "w");
5151 vfclose (create_linear_tree (name, n, fp));
5152 free_char (name, -1);
5156 char* prepare_subset2all (char *mode, Sequence *S, char *lib_file, Constraint_list *CL)
5165 if ( S->nseq==2) return NULL;
5166 name=declare_char (S->nseq+1, 100);
5167 done=declare_int (S->nseq, S->nseq);
5168 for (a=0; a<S->nseq; a++)done[a][a]=1;
5170 if ( check_file_exists (mode))
5173 L=main_read_seq (mode);
5174 for (a=0; a< L->nseq; a++)
5175 if ( (b=name_is_in_list (L->name[a], S->name,S->nseq, 100))!=-1)
5177 sprintf ( name[nseq++], "%s", L->name[a]);
5180 else if ( strm (mode, "_P_"))
5182 for (a=0; a<S->nseq; a++)
5184 if (seq_has_template (S, a, "_P_"))
5186 sprintf (name[nseq++], "%s", name [a]);
5190 else if ( is_number (mode))
5196 nseq=((float)S->nseq*((float)nseq/(float)100.0)*(float)-1);
5198 nseq=MIN(nseq,S->nseq);
5199 if ( nseq>=S->nseq)LS=S;
5204 A=very_fast_aln (seq2aln (S, NULL, RM_GAP), 0, NULL);
5205 sprintf (tmode, "_aln_n%d", nseq);
5206 SA=simple_trimseq (A, NULL, tmode, NULL);
5211 for (a=0; a<LS->nseq; a++)
5213 sprintf (name[a], "%s", LS->name[a]);
5214 fprintf ( stderr, "\n\tMaster Sequence: %s", name[a]);
5216 if (LS!=S)free_sequence (LS, LS->nseq);
5220 printf_exit (EXIT_FAILURE, stderr, "ERROR: %s is neither a file nor a method nor a number for subset2all [FATAL:%s]\n",mode,PROGRAM);
5223 sprintf (lib_file, "%s", vtmpnam (NULL));
5224 fp=vfopen (lib_file, "w");
5225 for (a=0; a<nseq; a++)
5227 for ( b=0; b<S->nseq; b++)
5229 if(!done[a][b] && !strm (name[a],S->name[b]))fprintf ( fp, "2 %s %s\n", name[a],S->name[b]);
5230 done[a][b]=done[b][a]=1;
5237 int set_methods_limits (char ** method,int nl,char **list, int n, int *maxnseq, int *maxlen)
5243 for (a=0; a<nl; a+=3)
5246 sprintf ( string, "M%s", method[a]);
5247 if ( name_is_in_list (string,list, n, 100)!=-1)
5250 ns=atoi(method[a+1]);
5251 ml=atoi(method[a+2]);
5253 if (ns!=-1 && (maxnseq[0]==-1 || maxnseq[0]>ns))maxnseq[0]=ns;
5254 if (ml!=-1 && (maxlen[0]==-1 || maxlen[0]>ml))maxlen[0]=ml;
5263 char * get_seq_type_from_cl (int argc, char **argv)
5270 sprintf (file, "%d.tmp", rand()%10000);
5271 buf=vcalloc ( 1000, sizeof (char));
5272 sprintf ( buf, "%s ", get_string_variable ("t_coffee"));
5273 for (a=1, seq=0; a<argc; a++)
5275 if ( check_file_exists (argv[a]))seq=1;
5277 if (!seq) return "";
5279 for (a=1; a< argc; a++)
5281 buf=strcat (buf, argv[a]);
5282 buf=strcat (buf, " ");
5285 buf=strcat (buf, " -type_only >");
5286 buf=strcat (buf, file);
5289 r=file2string (file);
5293 /*********************************COPYRIGHT NOTICE**********************************/
5294 /*© Centro de Regulacio Genomica */
5296 /*Cedric Notredame */
5297 /*Tue Oct 27 10:12:26 WEST 2009. */
5298 /*All rights reserved.*/
5299 /*This file is part of T-COFFEE.*/
5301 /* T-COFFEE is free software; you can redistribute it and/or modify*/
5302 /* it under the terms of the GNU General Public License as published by*/
5303 /* the Free Software Foundation; either version 2 of the License, or*/
5304 /* (at your option) any later version.*/
5306 /* T-COFFEE is distributed in the hope that it will be useful,*/
5307 /* but WITHOUT ANY WARRANTY; without even the implied warranty of*/
5308 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the*/
5309 /* GNU General Public License for more details.*/
5311 /* You should have received a copy of the GNU General Public License*/
5312 /* along with Foobar; if not, write to the Free Software*/
5313 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/
5314 /*............................................... |*/
5315 /* If you need some more information*/
5316 /* cedric.notredame@europe.com*/
5317 /*............................................... |*/
5321 /*********************************COPYRIGHT NOTICE**********************************/