Class AbstractLocusIterator<T extends AbstractRecordAndOffset,​K extends AbstractLocusInfo<T>>

    • Field Detail

      • includeIndels

        protected boolean includeIndels
        If true, include indels in the LocusInfo
    • Constructor Detail

      • AbstractLocusIterator

        public AbstractLocusIterator​(SamReader samReader,
                                     IntervalList intervalList,
                                     boolean useIndex)
        Prepare to iterate through the given SAM records, skipping non-primary alignments
        Parameters:
        samReader - must be coordinate sorted
        intervalList - Either the list of desired intervals, or null. Note that if an intervalList is passed in that is not coordinate sorted, it will eventually be coordinated sorted by this class.
        useIndex - If true, do indexed lookup to improve performance. Not relevant if intervalList == null. It is no longer the case the useIndex==true can make performance worse. It should always perform at least as well as useIndex==false, and generally will be much faster.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Returns true if there are more AbstractLocusInfo objects that can be returned, due to any of the following reasons: 1) there are more aligned reads in the SAM file 2) there are AbstractLocusInfos in some stage of accumulation 3) there are loci in the target mask that have yet to be accumulated (even if there are no reads covering them)
        Specified by:
        hasNext in interface Iterator<T extends AbstractRecordAndOffset>
      • next

        public K next()
        hasNext() has been fixed so that if it returns true, next() is now guaranteed not to return null.
        Specified by:
        next in interface Iterator<T extends AbstractRecordAndOffset>
        Returns:
        information about next locus position in reference sequence
      • getReferenceSequence

        protected SAMSequenceRecord getReferenceSequence​(int referenceSequenceIndex)
      • startWithInsertion

        protected static boolean startWithInsertion​(Cigar cigar)
        Check if cigar start with an insertion, ignoring other operators that do not consume references bases
        Parameters:
        cigar - the cigar
        Returns:
        true if the first operator to consume reference bases or be an insertion, is an insertion; false otherwise
      • setSamFilters

        public void setSamFilters​(List<SamRecordFilter> samFilters)
        Controls which, if any, SAMRecords are filtered. By default duplicate reads and non-primary alignments are filtered out. The list of filters passed here replaces any existing filters.
        Parameters:
        samFilters - list of filters, or null if no filtering is desired.
      • getQualityScoreCutoff

        public int getQualityScoreCutoff()
      • setQualityScoreCutoff

        public void setQualityScoreCutoff​(int qualityScoreCutoff)
      • getMappingQualityScoreCutoff

        public int getMappingQualityScoreCutoff()
      • setMappingQualityScoreCutoff

        public void setMappingQualityScoreCutoff​(int mappingQualityScoreCutoff)
      • isIncludeNonPfReads

        public boolean isIncludeNonPfReads()
      • setIncludeNonPfReads

        public void setIncludeNonPfReads​(boolean includeNonPfReads)
      • isEmitUncoveredLoci

        public boolean isEmitUncoveredLoci()
      • setEmitUncoveredLoci

        public void setEmitUncoveredLoci​(boolean emitUncoveredLoci)
      • getMaxReadsToAccumulatePerLocus

        public int getMaxReadsToAccumulatePerLocus()
      • setMaxReadsToAccumulatePerLocus

        public void setMaxReadsToAccumulatePerLocus​(int maxReadsToAccumulatePerLocus)
        If set, this will cap the number of reads we accumulate for any given position. As is pointed out above, setting this could cause major bias because of the non-random nature with which the cap is applied (the first maxReadsToAccumulatePerLocus reads are kept and all subsequent ones are dropped).
      • getCurrentInterval

        protected Interval getCurrentInterval()
      • isIncludeIndels

        public boolean isIncludeIndels()
      • setIncludeIndels

        public void setIncludeIndels​(boolean includeIndels)