Ignore:
Timestamp:
Apr 22, 2015, 1:05:43 AM (8 years ago)
Author:
Peter
Message:

add two new functions read_group and program_group to access data in BamHeader?. closes #817

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/bam_header.cc

    r3409 r3410  
    125125  }
    126126
     127  suite.err() << hdr.text() << "\n";
     128  try {
     129    std::string sample_name = hdr.read_group("foo", "SM");
     130    if (sample_name!="Tumour") {
     131      suite.add(false);
     132      suite.err() << "error: incorrect sample name: '" << sample_name << "'\n";
     133    }
     134
     135    std::string bwa_version = hdr.program_group("bwa", "VN");
     136    if (bwa_version!="0.6.1-r104") {
     137      suite.add(false);
     138      suite.err() << "error: incorrect bwa_version: '" << bwa_version << "'\n";
     139    }
     140  }
     141  catch (std::runtime_error& e) {
     142    suite.add(false);
     143    suite.err() << "error: exception: " << e.what() << "\n";
     144  }
    127145#endif
    128146}
Note: See TracChangeset for help on using the changeset viewer.