-
Notifications
You must be signed in to change notification settings - Fork 0
/
Magnum.cpp
66 lines (53 loc) · 1.9 KB
/
Magnum.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
Copyright 2018, Michael R. Hoopmann, Institute for Systems Biology
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "MAnalysis.h"
#include "MData.h"
#include "MDB.h"
#include "MIons.h"
#include "MParams.h"
#include "MagnumManager.h"
using namespace std;
int main(int argc, char* argv[]){
cout << "\nMagnum version " << VERSION << ", " << BDATE << endl;
cout << "Copyright Michael Hoopmann, Institute for Systems Biology" << endl;
cout << "Visit http://magnum-ms.org for full documentation." << endl;
if(argc<2){
cout << "Usage: magnum <Config File> [<Data File>...]" << endl;
cout << "\nNote: To create a default configuration file for Magnum, run the following command:" << endl;
cout << " magnum --config" << endl;
return 1;
}
if (strcmp(argv[1],"--config") == 0) {
MParams p;
p.exportDefault(VERSION);
cout << "\nmagnum_default_params.conf file created." << endl;
return 2;
}
cout << "\n****** Begin Magnum Analysis ******" << endl;
time_t timeNow;
time(&timeNow);
cout << " Time at start: " << ctime(&timeNow) << endl;
int i;
int fc=1;
MagnumManager manager;
if(!manager.setParams(argv[1])) return -3;
if(argc>2){
manager.clearFiles();
for (i = 2; i<argc; i++) fc = manager.setFile(argv[i]);
}
manager.run();
time(&timeNow);
cout << " Time at finish: " << ctime(&timeNow) << endl;
cout << "\n****** Finished Magnum Analysis ******" << endl;
return 0;
}