Class CSIIndex

    • Method Detail

      • getBinDepth

        public int getBinDepth()
        Bin depth is the number of levels of the index. By default, BAI has 6 levels. CSI makes this variable.
      • getMinShift

        public int getMinShift()
        2^(min shift) is the smallest width of a bin
      • getMaxBins

        public int getMaxBins()
      • getMaxSpan

        public int getMaxSpan()
      • getAuxData

        public byte[] getAuxData()
      • getBinsOverlapping

        public BinList getBinsOverlapping​(int referenceIndex,
                                          int startPos,
                                          int endPos)
        Description copied from interface: BrowseableBAMIndex
        Get a list of bins in the BAM file that may contain SAMRecords for the given range.
        Specified by:
        getBinsOverlapping in interface BrowseableBAMIndex
        Parameters:
        referenceIndex - sequence of desired SAMRecords
        startPos - 1-based start of the desired interval, inclusive
        endPos - 1-based end of the desired interval, inclusive
        Returns:
        a list of bins that contain relevant data.
      • getSpanOverlapping

        public BAMFileSpan getSpanOverlapping​(int referenceIndex,
                                              int startPos,
                                              int endPos)
        Description copied from interface: BAMIndex
        Gets the compressed chunks which should be searched for the contents of records contained by the span referenceIndex:startPos-endPos, inclusive. See the BAM spec for more information on how a chunk is represented.
        Specified by:
        getSpanOverlapping in interface BAMIndex
        Parameters:
        referenceIndex - The contig.
        startPos - Genomic start of query.
        endPos - Genomic end of query.
        Returns:
        A file span listing the chunks in the BAM file.
      • getSpanOverlapping

        public BAMFileSpan getSpanOverlapping​(Bin bin)
        Description copied from interface: BrowseableBAMIndex
        Perform an overlapping query of all bins bounding the given location.
        Specified by:
        getSpanOverlapping in interface BrowseableBAMIndex
        Parameters:
        bin - The bin over which to perform an overlapping query.
        Returns:
        The file pointers
      • getParentBinNumber

        public int getParentBinNumber​(int binNumber)
      • getParentBinNumber

        public int getParentBinNumber​(Bin bin)
      • query

        protected htsjdk.samtools.BAMIndexContent query​(int referenceSequence,
                                                        int startPos,
                                                        int endPos)
        Overrides:
        query in class AbstractBAMFileIndex
      • getMetaData

        public BAMIndexMetaData getMetaData​(int reference)
        Return meta data for the given reference including information about number of aligned, unaligned, and noCoordinate records
        Specified by:
        getMetaData in interface BAMIndex
        Overrides:
        getMetaData in class AbstractBAMFileIndex
        Parameters:
        reference - the reference of interest
        Returns:
        meta data for the reference
      • getNoCoordinateCount

        public Long getNoCoordinateCount()
        Returns count of records unassociated with any reference. Call before the index file is closed
        Overrides:
        getNoCoordinateCount in class AbstractBAMFileIndex
        Returns:
        meta data at the end of the bam index that indicates count of records holding no coordinates or null if no meta data (old index format)