Mercurial > repos > padge > trimal
annotate trimal_repo/source/readAl.cpp @ 0:b15a3147e604 draft
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
author | padge |
---|---|
date | Fri, 25 Mar 2022 17:10:43 +0000 |
parents | |
children |
rev | line source |
---|---|
0
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
1 /* ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
2 ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
3 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
4 readAl v1.4: a tool for automated alignment conversion among different |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
5 formats. |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
6 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
7 2009-2015 Capella-Gutierrez S. and Gabaldon, T. |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
8 [scapella, tgabaldon]@crg.es |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
9 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
10 This file is part of readAl. |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
11 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
12 readAl is free software: you can redistribute it and/or modify |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
13 it under the terms of the GNU General Public License as published by |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
14 the Free Software Foundation, the last available version. |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
15 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
16 readAl is distributed in the hope that it will be useful, |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
17 but WITHOUT ANY WARRANTY; without even the implied warranty of |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
19 GNU General Public License for more details. |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
20 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
21 You should have received a copy of the GNU General Public License |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
22 along with readAl. If not, see <http://www.gnu.org/licenses/>. |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
23 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
24 ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
25 ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
26 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
27 #include <stdlib.h> |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
28 #include <string.h> |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
29 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
30 #include "alignment.h" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
31 #include "defines.h" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
32 #include "utils.h" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
33 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
34 void menu(void); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
35 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
36 int main(int argc, char *argv[]) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
37 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
38 /* Input alignment */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
39 alignment inAlig; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
40 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
41 /* Local variables */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
42 string align_format; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
43 int i, outformat = -1; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
44 char *infile = NULL, *outfile = NULL; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
45 bool errors = false, reverse = false, shortNames = false, format = false, \ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
46 type = false, info = false; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
47 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
48 /* If there is no parameters: Inform about readAl options and finish */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
49 if(argc == 1) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
50 menu(); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
51 return 0; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
52 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
53 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
54 i = 1; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
55 /* If option -h has been used, inform about readAl options and finish */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
56 if(!strcmp(argv[i], "-h") && (i+1 == argc)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
57 menu(); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
58 return 0; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
59 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
60 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
61 /* Inform about current readAl version/revision/build and finish */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
62 if(!strcmp(argv[i], "--version") && (i+1 == argc)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
63 cout << endl << "readAl v" << VERSION << ".rev" << REVISION << " build[" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
64 << BUILD << "]" << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
65 return 0; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
66 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
67 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
68 /* Catch different input options and then check whether there is a valid |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
69 * combination of parameters */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
70 while(i < argc) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
71 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
72 /* Input alignment option: -in */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
73 if(!strcmp(argv[i], "-in") && (i+1 != argc) && (infile == NULL)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
74 /* Allocate memory for storing input alignment filename */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
75 infile = new char[strlen(argv[++i]) + 1]; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
76 strcpy(infile, argv[i]); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
77 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
78 /* Load input alignment and inform about it if something is wrong */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
79 if(!inAlig.loadAlignment(infile)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
80 cerr << endl << "ERROR: Alignment not loaded: \"" << infile |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
81 << "\" Check the file's content." << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
82 errors = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
83 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
84 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
85 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
86 /* Output filename option: -out */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
87 else if(!strcmp(argv[i], "-out") && (i+1 != argc) && (outfile == NULL)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
88 /* Allocate memory for storing output alignment filename */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
89 outfile = new char[strlen(argv[++i]) + 1]; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
90 strcpy(outfile, argv[i]); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
91 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
92 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
93 /* Get information about input file format */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
94 else if(!strcmp(argv[i], "-format") && (!format)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
95 format = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
96 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
97 /* Get information about input file residues type */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
98 else if(!strcmp(argv[i], "-type") && (!type)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
99 type = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
100 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
101 /* Get general information about input file: seqs number, average seq length, |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
102 * etc */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
103 else if(!strcmp(argv[i], "-info") && (!info)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
104 info = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
105 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
106 /* Get input sequences reverse option: -reverse */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
107 else if(!strcmp(argv[i], "-reverse") && (!reverse)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
108 reverse = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
109 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
110 /* For all output format options is checked if more |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
111 * than one output format has been required */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
112 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
113 /* Set output alignment format to CLUSTAL: -clustal */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
114 else if(!strcmp(argv[i], "-clustal") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
115 outformat = 1; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
116 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
117 /* Set output alignment format to FASTA: -fasta */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
118 else if(!strcmp(argv[i], "-fasta") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
119 outformat = 8; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
120 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
121 /* Set output alignment format to FASTA and ask for using only |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
122 * up to 10 characters for sequences name: -fasta_m10 */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
123 else if(!strcmp(argv[i], "-fasta_m10") && (outformat == -1)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
124 outformat = 8; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
125 shortNames = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
126 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
127 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
128 /* Set output alignment format to NBRF/PIR: -nbrf */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
129 else if(!strcmp(argv[i], "-nbrf") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
130 outformat = 3; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
131 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
132 /* Set output alignment format to NEXUS: -nexus */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
133 else if(!strcmp(argv[i], "-nexus") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
134 outformat = 17; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
135 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
136 /* Set output alignment format to MEGA: -mega */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
137 else if(!strcmp(argv[i], "-mega") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
138 outformat = 21; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
139 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
140 /* Set output alignment format to PHYLIP3.2 (sequential): -phylip3.2 */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
141 else if(!strcmp(argv[i], "-phylip3.2") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
142 outformat = 11; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
143 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
144 /* Set output alignment format to PHYLIP3.2 (sequential) and ask for |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
145 * using only up to 10 characters for sequences name: -phylip3.2_m10 */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
146 else if(!strcmp(argv[i], "-phylip3.2_m10") && (outformat == -1)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
147 outformat = 11; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
148 shortNames = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
149 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
150 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
151 /* Set output alignment format to PHYLIP (interleaved): -phylip */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
152 else if(!strcmp(argv[i], "-phylip") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
153 outformat = 12; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
154 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
155 /* Set output alignment format to PHYLIP (interleaved) and ask for |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
156 * using only up to 10 characters for sequences name: -phylip_m10 */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
157 else if(!strcmp(argv[i], "-phylip_m10") && (outformat == -1)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
158 outformat = 12; shortNames = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
159 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
160 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
161 /* Set output alignment format to PHYLIP compatible with programs |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
162 * such as PAML: -phylip_paml */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
163 else if(!strcmp(argv[i], "-phylip_paml") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
164 outformat = 13; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
165 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
166 /* Set output alignment format to PHYLIP compatible with programs such as |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
167 * PAML and ask for using only up to 10 characters for sequences name: |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
168 * -phylip_paml_m10 */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
169 else if(!strcmp(argv[i], "-phylip_paml_m10") && (outformat == -1)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
170 outformat = 13; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
171 shortNames = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
172 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
173 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
174 /* Set output alignment format to HTML, that means residues will be colored |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
175 * according to its physic-chemical properties using CLUSTAL color scheme: |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
176 * -html */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
177 else if(!strcmp(argv[i], "-html") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
178 outformat = 100; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
179 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
180 /* Get unaligned sequences from input file: -onlyseqs */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
181 else if(!strcmp(argv[i], "-onlyseqs") && (outformat == -1)) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
182 outformat = 99; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
183 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
184 /* Inform about no valid options */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
185 else { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
186 cerr << endl << "ERROR: Parameter \"" << argv[i] << "\" not valid." |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
187 << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
188 errors = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
189 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
190 i++; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
191 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
192 /* If any error has been detected, break input options loop |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
193 * and then process detected error */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
194 if(errors) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
195 break; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
196 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
197 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
198 /* Final verifications to detect any possible mistake in the input options */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
199 /* It is mandatory to provide an input file. Otherwise, inform about it */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
200 if((infile == NULL) && (!errors)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
201 cerr << endl << "ERROR: An input file has to be defined." << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
202 errors = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
203 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
204 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
205 /* It is mandatory to choose an option for processing input alignment */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
206 if((outformat == -1) && (!reverse) && (!format) && (!type) && (!info) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
207 && (!errors)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
208 cerr << endl << "ERROR: An option has to be chosen." << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
209 errors = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
210 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
211 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
212 /* Only one option can be selected when an output file is not defined */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
213 if((outfile == NULL) && ((outformat != -1) || reverse) && (format || type \ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
214 || info) && (!errors)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
215 cerr << endl << "ERROR: Only one option can be selected: either an output " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
216 << "format or get information about input file when an output file is " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
217 << "not defined" << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
218 errors = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
219 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
220 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
221 /* Does not make any sense to define any output file when |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
222 * only information about input alignment is requested */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
223 if(((outfile != NULL) && outformat == -1 && !reverse) && (format || type \ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
224 || info) && (!errors)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
225 cerr << endl << "ERROR: An output file should not be provided when only " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
226 << "information about input alignment is requested" << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
227 errors = true; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
228 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
229 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
230 /* If no error has been detected, process input file */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
231 if(!errors) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
232 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
233 /* Print information about input alignment */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
234 if((format) || (type) || (info)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
235 cout << "## Input filename\t'" << infile << "'" << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
236 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
237 if(format) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
238 /* Input file format */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
239 if (inAlig.getInputFormat() == 1) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
240 align_format = "clustal"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
241 else if (inAlig.getInputFormat() == 3) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
242 align_format = "nbrf/pir"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
243 else if (inAlig.getInputFormat() == 8) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
244 align_format = "fasta"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
245 else if (inAlig.getInputFormat() == 11) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
246 align_format = "phylip3.2"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
247 else if (inAlig.getInputFormat() == 12) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
248 align_format = "phylip"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
249 else if (inAlig.getInputFormat() == 17) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
250 align_format = "nexus"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
251 else if (inAlig.getInputFormat() == 21) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
252 align_format = "mega_interleaved"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
253 else if (inAlig.getInputFormat() == 22) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
254 align_format = "mega_sequential"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
255 else |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
256 align_format = "unknown"; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
257 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
258 /* Inform about if sequences are aligned or not */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
259 cout << "## Input file format\t" << align_format << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
260 << "## Input file aligned\t" << (inAlig.isFileAligned() ? "YES":"NO") |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
261 << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
262 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
263 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
264 if(type) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
265 /* Inform about biological datatype */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
266 if (inAlig.getTypeAlignment() == DNAType) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
267 cout << "## Input file datatype\tnucleotides:dna" << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
268 else if (inAlig.getTypeAlignment() == DNADeg) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
269 cout << "## Input file datatype\tnucleotides:dna_degenerate_codes" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
270 << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
271 else if (inAlig.getTypeAlignment() == RNAType) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
272 cout << "## Input file datatype\tnucleotides:rna" << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
273 else if (inAlig.getTypeAlignment() == RNADeg) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
274 cout << "## Input file datatype\tnucleotides:rna_degenerate_codes" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
275 << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
276 else if (inAlig.getTypeAlignment() == AAType) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
277 cout << "## Input file datatype\tamino-acids" << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
278 else |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
279 cout << "## Input file datatype\tunknown" << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
280 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
281 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
282 if(info) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
283 inAlig.printAlignmentInfo(cout); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
284 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
285 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
286 if((outfile != NULL) || (outformat != -1) || reverse || shortNames) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
287 /* Set output format */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
288 if(outformat != -1 || shortNames) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
289 inAlig.setOutputFormat(outformat, shortNames); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
290 /* Ask for getting the reverse of input file */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
291 if(reverse) |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
292 inAlig.setReverse(); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
293 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
294 /* If a outfile has been provided, try to generate output file */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
295 if(outfile != NULL) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
296 if(!inAlig.saveAlignment(outfile)) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
297 cerr << endl << "ERROR: Impossible to generate OUTPUT file." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
298 << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
299 return -1; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
300 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
301 /* ... otherwise dump outfile content to standard output */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
302 } else { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
303 inAlig.printAlignment(); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
304 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
305 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
306 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
307 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
308 /* Deallocate local memory */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
309 delete [] infile; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
310 delete [] outfile; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
311 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
312 /* Inform about readAl execution */ |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
313 return (errors == true ? -1 : 0); |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
314 } |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
315 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
316 void menu(void) { |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
317 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
318 cout << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
319 << "readAl v" << VERSION << ".rev" << REVISION << " build[" << BUILD |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
320 << "]. " << AUTHORS << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
321 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
322 << "readAl webpage: http://trimal.cgenomics.org" << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
323 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
324 << "This program is free software: you can redistribute it and/or modify " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
325 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
326 << "it under the terms of the GNU General Public License as published by " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
327 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
328 << "the Free Software Foundation, the last available version." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
329 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
330 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
331 << "Basic usage" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
332 << "\treadal -in <inputfile> -out <outputfile> [options]." << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
333 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
334 << "\t-h " << "Show this information." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
335 << "\t--version " << "Show readAl version." << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
336 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
337 << "\t-in <inputfile> " << "Input file in several formats." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
338 << "\t-out <outputfile> " << "Output file name (default STDOUT)." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
339 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
340 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
341 << "\t-format " << "Print information about input file format " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
342 << "and if sequences are aligned or not." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
343 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
344 << "\t-type " << "Print information about biological " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
345 << "sequences datatype (e.g. nucleotides:dna, nucleotides:rna, aminoacids, etc)" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
346 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
347 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
348 << "\t-info " << "Print information about sequences number, " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
349 << "average sequence length, max & min sequence length" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
350 << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
351 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
352 << "\t-onlyseqs " << "Generate output with only residues from " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
353 << "input file" << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
354 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
355 << "\t-html " << "Output residues colored according their " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
356 << "physicochemical properties. HTML file." << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
357 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
358 << "\t-reverse " << "Output the reverse of sequences in " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
359 << "input file." << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
360 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
361 << "\t-nbrf " << "Output file in NBRF/PIR format" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
362 << "\t-mega " << "Output file in MEGA format" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
363 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
364 << "\t-nexus " << "Output file in NEXUS format" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
365 << "\t-clustal " << "Output file in CLUSTAL format" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
366 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
367 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
368 << "\t-fasta " << "Output file in FASTA format" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
369 << "\t-fasta_m10 " << "Output file in FASTA format. Sequences " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
370 << "name up to 10 characters." << endl << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
371 |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
372 << "\t-phylip " << "Output file in PHYLIP/PHYLIP4 format" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
373 << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
374 << "\t-phylip_m10 " << "Output file in PHYLIP/PHYLIP4 format. " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
375 << "Sequences name up to 10 characters." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
376 << "\t-phylip_paml " << "Output file in PHYLIP format compatible " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
377 << "with PAML" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
378 << "\t-phylip_paml_m10 " << "Output file in PHYLIP format compatible " |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
379 << "with PAML. Sequences name up to 10 characters." << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
380 << "\t-phylip3.2 " << "Output file in PHYLIP3.2 format" << endl |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
381 << "\t-phylip3.2_m10 " << "Output file in PHYLIP3.2 format. Sequences" |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
382 << " name up to 10 characters." << endl << endl; |
b15a3147e604
"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
padge
parents:
diff
changeset
|
383 } |