trimAlMain.cpp
Go to the documentation of this file.
1
/* *****************************************************************************
2
3
trimAl v2.0: a tool for automated alignment trimming in large-scale
4
phylogenetics analyses.
5
6
readAl v2.0: a tool for automated alignment conversion among different
7
formats.
8
9
2009-2019
10
Fernandez-Rodriguez V. (victor.fernandez@bsc.es)
11
Capella-Gutierrez S. (salvador.capella@bsc.es)
12
Gabaldon, T. (tgabaldon@crg.es)
13
14
This file is part of trimAl/readAl.
15
16
trimAl/readAl are free software: you can redistribute it and/or modify
17
it under the terms of the GNU General Public License as published by
18
the Free Software Foundation, the last available version.
19
20
trimAl/readAl are distributed in the hope that it will be useful,
21
but WITHOUT ANY WARRANTY; without even the implied warranty of
22
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
GNU General Public License for more details.
24
25
You should have received a copy of the GNU General Public License
26
along with trimAl/readAl. If not, see <http://www.gnu.org/licenses/>.
27
28
***************************************************************************** */
29
30
#
include
"InternalBenchmarker.h"
31
#
include
"trimalManager.h"
32
#
include
"reportsystem.h"
33
34
int
main
(
int
argc,
char
*argv[]) {
35
36
// We have to check the output parameter of the timerFactory
37
// before it's called the first time
38
#
if
TimingReport
39
timerFactory.checkOutputParameter(argc, argv);
40
#
endif
41
42
// Debug tag to prevent Debug Messages to be printed on user side
43
debug
.
IsDebug
=
true
;
44
45
// To allow timing the whole program, we must encapsulate
46
// inside it's own scope. Thus, we store the returnValue outside
47
// the scope.
48
int
returnValue;
49
{
50
// Create a BenchmarkSnapshot that will report times and/or memory usage
51
// upon its destruction
52
StartTiming
(
"int main(int argc, char *argv[]) "
);
53
54
// Create trimAl Manager
55
trimAlManager
trimAl;
56
57
returnValue = trimAl
.
parseArguments
(
argc
,
argv
)
;
58
59
if
(returnValue ==
trimAlManager
::
Final
| returnValue ==
trimAlManager
::
Errored
)
60
exit(0);
61
62
// Process them: Incompatibilities and co-dependencies
63
trimAl
.
processArguments
(
argv
)
;
64
65
// Perform the required actions
66
returnValue = trimAl
.
perform
(
)
;
67
}
68
69
// Return the exit code obtained in the perform method.
70
return
returnValue;
71
}
reporting::reportManager::IsDebug
bool IsDebug
Protection variable. This variable should be set to true while in development, and false on Release...
Definition:
reportsystem.h:382
trimAlManager::processArguments
bool processArguments(char *argv[])
Method to process the information obtained by trimAlManager::parseArguments It checks for argument in...
Definition:
trimalManager.cpp:1004
trimAlManager::Errored
Definition:
trimalManager.h:182
trimAlManager::perform
int perform()
Method to perform the analysis if all checks have passed.
Definition:
trimalManager.cpp:1668
StartTiming
#define StartTiming(name)
Definition:
InternalBenchmarker.h:165
TimingReport
#define TimingReport
Definition:
InternalBenchmarker.h:40
main
int main(int argc, char *argv[])
Definition:
trimAlMain.cpp:34
debug
reporting::reportManager debug
Definition:
reportsystem.cpp:33
trimAlManager::Final
Definition:
trimalManager.h:183
trimAlManager
Main class of trimAl. It is strutured to work with 3 calls:
Definition:
trimalManager.h:62
trimAlManager::parseArguments
int parseArguments(int argc, char **argv)
Method to parse arguments into usable structure in trimal.
Definition:
trimalManager.cpp:74
source
trimAlMain.cpp
Generated by
1.8.13