nl_tokens: The contained parameter controls whether the alignments must be fully contained within the range or need only overlap it .
pl_tokens: function isAlignmentInRange ( read : SamRead , idxRange : ContigInterval < number > , contained : boolean ) : boolean { // TODO: Use cigar.getReferenceLength() instead of l_seq, like htsjdk.  var readRange = new ContigInterval ( read . refID , read . pos , <mask> . pos + read . l_seq - 1 ) ; if ( contained ) { return idxRange . containsInterval ( readRange ) ; } else { return readRange . intersects ( idxRange ) ; } }