Changeset 3201
- Timestamp:
- May 3, 2014, 2:57:59 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r3198 r3201 369 369 # try link against libbam 370 370 YAT_CHECK_LIBBAM([LIBS="$BAM_LIBS $LIBS" 371 AC_DEFINE([ HAVE_LIBBAM], [1],371 AC_DEFINE([YAT_HAVE_LIBBAM], [1], 372 372 [Define to 1 if libbam is available])], 373 373 [AC_MSG_FAILURE([library 'libbam' was not found])]) -
trunk/test/Suite.cc
r2919 r3201 41 41 namespace test { 42 42 43 Suite::Suite(int argc, char* argv[] )43 Suite::Suite(int argc, char* argv[], bool require_bam) 44 44 : known_issues_(0), ok_(true) 45 45 { 46 if (require_bam) { 47 #ifndef YAT_HAVE_LIBBAM 48 out() << "no libbam\n"; 49 return EXIT_SKIP; 50 #endif 51 #ifndef HAVE_SAMTOOLS 52 out() << "no samtools\n"; 53 return EXIT_SKIP; 54 #endif 55 } 46 56 std::string test_dir = "test/testSubDir/" + utility::basename(argv[0]); 47 57 utility::mkdir_p(test_dir); -
trunk/test/Suite.h
r3149 r3201 56 56 { 57 57 public: 58 Suite(int argc, char* argv[] );58 Suite(int argc, char* argv[], bool require_bam=false); 59 59 60 60 /** … … 114 114 */ 115 115 std::ostream& out(void) const; 116 116 117 117 /** 118 118 In verbose mode a final message is sent to std::cout. -
trunk/test/bam.cc
r3162 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamFile.h" 24 24 #include "yat/omic/BamRead.h" … … 34 34 int main(int argc, char* argv[]) 35 35 { 36 test::Suite suite(argc, argv); 37 #ifndef HAVE_LIBBAM 38 suite.out() << "no libbam\n"; 39 return EXIT_SKIP; 40 #endif 41 #ifndef HAVE_SAMTOOLS 42 suite.out() << "no samtools\n"; 43 return EXIT_SKIP; 44 #endif 45 #ifdef HAVE_LIBBAM 36 test::Suite suite(argc, argv, true); 37 #ifdef YAT_HAVE_LIBBAM 46 38 test1(suite); 47 39 #endif … … 49 41 } 50 42 51 #ifdef HAVE_LIBBAM43 #ifdef YAT_HAVE_LIBBAM 52 44 using namespace omic; 53 45 -
trunk/test/bam_header.cc
r2999 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamFile.h" 24 24 #include "yat/omic/BamHeader.h" … … 31 31 int main(int argc, char* argv[]) 32 32 { 33 #ifdef SKIP_BAM_TEST 34 return EXIT_SKIP; 35 #endif 36 test::Suite suite(argc, argv); 33 test::Suite suite(argc, argv, true); 37 34 try { 38 35 test1(suite); … … 48 45 void test1(test::Suite& suite) 49 46 { 50 #ifdef HAVE_LIBBAM47 #ifdef YAT_HAVE_LIBBAM 51 48 using namespace omic; 52 49 std::string file = "../../data/foo.sorted.bam"; -
trunk/test/bam_header2.cc
r3144 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamFile.h" 24 24 #include "yat/omic/BamHeader.h" … … 27 27 using namespace theplu::yat; 28 28 29 #if def SKIP_BAM_TEST29 #ifndef YAT_HAVE_LIBBAM 30 30 void do_main(test::Suite& suite) {} 31 31 #else … … 35 35 int main(int argc, char* argv[]) 36 36 { 37 #ifdef SKIP_BAM_TEST 38 return EXIT_SKIP; 39 #endif 40 test::Suite suite(argc, argv); 37 test::Suite suite(argc, argv, true); 41 38 try { 42 39 do_main(suite); … … 50 47 } 51 48 52 #ifdef HAVE_LIBBAM49 #ifdef YAT_HAVE_LIBBAM 53 50 void do_main(test::Suite& suite) 54 51 { -
trunk/test/bam_iterator.cc
r3150 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamFile.h" 24 24 #include "yat/omic/BamRead.h" … … 38 38 int main(int argc, char* argv[]) 39 39 { 40 test::Suite suite(argc, argv); 41 #ifndef HAVE_LIBBAM 42 suite.out() << "no libbam\n"; 43 return EXIT_SKIP; 44 #endif 45 #ifndef HAVE_SAMTOOLS 46 suite.out() << "no samtools\n"; 47 return EXIT_SKIP; 48 #endif 40 test::Suite suite(argc, argv, true); 49 41 try { 50 42 test1(suite); … … 57 49 } 58 50 59 #ifdef HAVE_LIBBAM51 #ifdef YAT_HAVE_LIBBAM 60 52 using namespace omic; 61 53 -
trunk/test/bam_pair_analyse.cc
r3175 r3201 22 22 using namespace theplu::yat; 23 23 24 #if HAVE_LIBBAM24 #if YAT_HAVE_LIBBAM 25 25 #include "yat/omic/algorithm.h" 26 26 #include "yat/omic/BamRead.h" … … 32 32 int main(int argc, char* argv[]) 33 33 { 34 test::Suite suite(argc, argv); 35 #ifndef HAVE_LIBBAM 36 suite.out() << "no libbam\n"; 37 return EXIT_SKIP; 38 #endif 39 #ifndef HAVE_SAMTOOLS 40 suite.out() << "no samtools available\n"; 41 return EXIT_SKIP; 42 #endif 34 test::Suite suite(argc, argv, true); 43 35 44 #ifdef HAVE_LIBBAM36 #ifdef YAT_HAVE_LIBBAM 45 37 test1(suite); 46 38 #endif … … 49 41 50 42 51 #ifdef HAVE_LIBBAM43 #ifdef YAT_HAVE_LIBBAM 52 44 using namespace omic; 53 45 -
trunk/test/bam_pair_iterator.cc
r3197 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamFile.h" 24 24 #include "yat/omic/BamPairIterator.h" … … 39 39 int main(int argc, char* argv[]) 40 40 { 41 test::Suite suite(argc, argv); 42 #ifndef HAVE_LIBBAM 43 suite.out() << "no libbam\n"; 44 return EXIT_SKIP; 45 #endif 46 #ifndef HAVE_SAMTOOLS 47 suite.out() << "no samtools\n"; 48 return EXIT_SKIP; 49 #endif 41 test::Suite suite(argc, argv, true); 50 42 try { 51 43 test1(suite); … … 58 50 } 59 51 60 #ifdef HAVE_LIBBAM61 52 using namespace omic; 62 53 63 54 void test1(test::Suite& suite) 64 55 { 56 #ifdef YAT_HAVE_LIBBAM 65 57 std::string file = "../../data/foo.sorted.bam"; 66 58 … … 93 85 94 86 // suite.test_input_iterator(piter); 87 #endif 95 88 } 96 #endif -
trunk/test/bam_read_filter.cc
r2994 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamFile.h" 24 24 #include "yat/omic/BamRead.h" … … 40 40 int main(int argc, char* argv[]) 41 41 { 42 test::Suite suite(argc, argv); 43 #ifndef HAVE_LIBBAM 44 suite.out() << "no libbam\n"; 45 return EXIT_SKIP; 46 #endif 47 #ifndef HAVE_SAMTOOLS 48 suite.out() << "no samtools\n"; 49 return EXIT_SKIP; 50 #endif 51 #ifdef HAVE_LIBBAM 42 test::Suite suite(argc, argv, true); 43 #ifdef YAT_HAVE_LIBBAM 52 44 test1(suite); 53 45 #endif … … 55 47 } 56 48 57 #ifdef HAVE_LIBBAM49 #ifdef YAT_HAVE_LIBBAM 58 50 using namespace omic; 59 51 -
trunk/test/bam_region_iterator.cc
r3056 r3201 20 20 #include "Suite.h" 21 21 22 #ifdef HAVE_LIBBAM22 #ifdef YAT_HAVE_LIBBAM 23 23 #include "yat/omic/BamReadIterator.h" 24 24 #include "yat/omic/BamWriteIterator.h" … … 43 43 int main(int argc, char* argv[]) 44 44 { 45 test::Suite suite(argc, argv); 46 #ifndef HAVE_LIBBAM 47 suite.out() << "no libbam\n"; 48 return EXIT_SKIP; 49 #endif 50 #ifndef HAVE_SAMTOOLS 51 suite.out() << "no samtools\n"; 52 return EXIT_SKIP; 53 #endif 45 test::Suite suite(argc, argv, true); 54 46 55 47 try { … … 66 58 void test1(test::Suite& suite) 67 59 { 68 #ifdef HAVE_LIBBAM60 #ifdef YAT_HAVE_LIBBAM 69 61 using namespace omic; 70 62 std::string file = "../../data/foo.sorted.bam"; -
trunk/test/cigar.cc
r3200 r3201 78 78 } 79 79 80 suite.add(cig.op(0)==0); 81 suite.add(cig.opchr(0)=='M'); 82 suite.add(cig.oplen(0)==10); 80 if (!suite.add(cig.op(0)==0)) 81 suite.err() << "error: cig.op(0): " << cig.op(0) << " expected 0\n"; 82 suite.out() << cig << "\n"; 83 if (!suite.add(cig.opchr(0)=='M')) 84 suite.err() << "error: cig.opchr(0): " << cig.opchr(0) << " expected M\n"; 85 if (!suite.add(cig.oplen(0)==10)) 86 suite.err() << "error: cig.oplen(0): " << cig.oplen(0) << " expected 10\n"; 83 87 cig.pop_front(2); 84 suite.add(cig.oplen(0)==8); 88 suite.out() << cig << "\n"; 89 if (!suite.add(cig.oplen(0)==8)) 90 suite.err() << "error: cig.oplen(0): " << cig.oplen(0) << " expected 8\n"; 91 85 92 cig.pop_front(9); 86 suite.add(cig.oplen(0)==6); 93 suite.out() << cig << "\n"; 94 if (!suite.add(cig.oplen(0)==6)) 95 suite.err() << "error: cig.oplen(1): " << cig.oplen(1) << " expected 6\n"; 96 87 97 cig.push_back(3); 98 suite.out() << cig << "\n"; 88 99 cig.pop_back(1); 89 suite.add(cig.oplen(0)==6); 100 suite.out() << cig << "\n"; 101 102 if (!suite.add(cig.oplen(0)==6)) 103 suite.err() << "error: cig.oplen(1): " << cig.oplen(1) << " expected 6\n"; 104 90 105 cig[0]; 91 106 suite.out() << "size: " << cig.size() << "\n"; -
trunk/yat/utility/Aligner.cc
r3200 r3201 229 229 { 230 230 if (cigar_.empty() || this->op(size()-1)!=op) 231 cigar_.push_ front(bam_cigar_gen(len, op));231 cigar_.push_back(bam_cigar_gen(len, op)); 232 232 else 233 233 cigar_[size()-1] += (len<<BAM_CIGAR_SHIFT); -
trunk/yat/utility/config_public.h.in
r3198 r3201 37 37 #undef YAT_HAVE_SAMTOOLS_BAM_H 38 38 39 /// Define to 1 if libbam is available 40 #undef YAT_HAVE_LIBBAM 41 39 42 /// Define if compiler supports deprecated attribute, as in g++ 4.0 40 43 #undef YAT_HAVE_GCC_DEPRECATED
Note: See TracChangeset
for help on using the changeset viewer.