Changeset 3327 for trunk/test/pileup.cc


Ignore:
Timestamp:
Oct 10, 2014, 10:30:20 AM (7 years ago)
Author:
Peter
Message:

redefine Pileup::const_iterator so it avoids reads that do not overlap current position. refs #806

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/pileup.cc

    r3317 r3327  
    9393    std::string str;
    9494    for (; iter!=pileup.end(); ++iter) {
    95       if (iter->end_of_sequence())
    96         continue;
     95      if (iter->bam().end() <= pileup.pos()) {
     96        suite.err() << "error: " << pileup.pos() << " "
     97                    << iter->bam().pos() << " "
     98                    << iter->bam().end() << " "
     99                    << iter->bam().cigar_str()
     100                    << "\n";
     101        suite.add(false);
     102        continue;
     103      }
    97104      str += bam_nt16_rev_table[iter->sequence()];
    98105    }
     
    185192       plp.increment()) {
    186193    for (plp_iterator i = plp.begin(); i!=plp.end(); ++i) {
    187       if (i->end_of_sequence())
    188         continue;
    189194      if (!same_query_name(i->bam(), reads[1]))
    190195        continue;
     
    231236       plp.increment()) {
    232237    for (plp_iterator i = plp.begin(); i!=plp.end(); ++i) {
    233       if (i->end_of_sequence())
    234         continue;
    235238      if (!same_query_name(i->bam(), reads[1]))
    236239        continue;
     
    275278       plp.increment()) {
    276279    for (plp_iterator i = plp.begin(); i!=plp.end(); ++i) {
    277       if (i->end_of_sequence())
    278         continue;
    279280      if (!same_query_name(i->bam(), reads[1]))
    280281        continue;
Note: See TracChangeset for help on using the changeset viewer.