libStatGen Software  1
Main.cpp
1 /*
2  * Copyright (C) 2010 Regents of the University of Michigan
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "ReadFiles.h"
19 #include "WriteFiles.h"
20 #include "ValidationTest.h"
21 #include "BamIndexTest.h"
22 #include "ModifyVar.h"
23 #include "Modify.h"
24 #include "SamFileTest.h"
25 #include "TestEquals.h"
26 #include "TestFilter.h"
27 #include "ShiftIndels.h"
28 #include "TestPileup.h"
29 #include "TestPosList.h"
30 #include "TestCigarHelper.h"
31 #include "TestSamRecordPool.h"
32 #include "TestSamCoordOutput.h"
33 #include "TestSamRecordHelper.h"
34 
35 int main(int argc, char ** argv)
36 {
37  if(argc == 1)
38  {
39  testReadSam();
40 #ifdef __ZLIB_AVAILABLE__
41  testReadBam();
42  testReadBam();
43 #endif
44  testAddHeaderAndTagToFile("testFiles/testSam.sam",
45  "results/addedTagToSam.bam");
46  testAddHeaderAndTagToFile("testFiles/testSam.sam",
47  "results/addedTagToSam.sam");
48 // Can't read bams without zlib
49 #ifdef __ZLIB_AVAILABLE__
50  testAddHeaderAndTagToFile("testFiles/testBam.bam",
51  "results/addedTagToBam.sam");
52  testAddHeaderAndTagToFile("testFiles/testBam.bam",
53  "results/addedTagToBam.bam");
54 #endif
55 
56  testValidateSortedRead();
57 
58  testWrite();
59 
60  testSamQNAME();
61  testBamRID();
62  testEmptyQual();
63 
64 // Can't read bams without zlib
65 #ifdef __ZLIB_AVAILABLE__
66  testBamIndex();
67 #endif
68 
69  testModifyVar();
70  testModify();
71 
72  testSamFile();
73 
74  testSeqEquals();
75 
76  testFilter();
77 
78  testShiftIndels();
79 
80  testPileup();
81 
82  testPosList();
83 
84  testCigarHelper();
85  testSamRecordPool();
86  testSamCoordOutput();
87  testSamRecordHelper();
88  }
89  else
90  {
91  modifyFirstBaseLong();
92  }
93 }
94