Changeset 3916


Ignore:
Timestamp:
May 31, 2020, 5:31:11 AM (3 years ago)
Author:
Peter
Message:

avoid incrementing read if it's being removed on the next line. Get rid of comment about speedup; if there is a range of reads to remove it's faster to call list::erase with iterators, but to keep track of that requires book keeping and rarely worth it in the typical case when there are rarely many reads with end position.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/Pileup.h

    r3855 r3916  
    340340        typename std::list<Entry>::iterator read = data_.begin();
    341341        while (read != data_.end()) {
    342           read->increment();
    343342          // remove entry if read is entirely left of pos
    344           if (read->bam().end() <= pos_) { // FIXME speedup possible
     343          if (read->bam().end() <= pos_) {
    345344            data_.erase(read++);
    346345            continue;
    347346          }
     347          read->increment();
    348348          // check if we're stepping into insertion
    349349          if (read->cigar_op() == BAM_CINS) {
Note: See TracChangeset for help on using the changeset viewer.