Package htsjdk.samtools
Class BinningIndexContent
- java.lang.Object
-
- htsjdk.samtools.BinningIndexContent
-
public class BinningIndexContent extends Object
In-memory representation of the binning index for a single reference. BAM and Tabix are both binning indices with slightly different disk formats but identical in-memory representations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BinningIndexContent.BinList
This class is used to encapsulate the list of Bins store in the BAMIndexContent While it is currently represented as an array, we may decide to change it to an ArrayList or other structure
-
Constructor Summary
Constructors Constructor Description BinningIndexContent(int referenceSequence, BinningIndexContent.BinList binList, LinearIndex linearIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsBin(Bin bin)
Does this content have anything in this bin?boolean
equals(Object o)
List<Chunk>
getAllChunks()
BinningIndexContent.BinList
getBins()
List<Chunk>
getChunksOverlapping(int startPos, int endPos)
LinearIndex
getLinearIndex()
int
getReferenceSequence()
Reference for this Contentint
hashCode()
-
-
-
Constructor Detail
-
BinningIndexContent
public BinningIndexContent(int referenceSequence, BinningIndexContent.BinList binList, LinearIndex linearIndex)
- Parameters:
referenceSequence
- Content corresponds to this reference.binList
- Array of bins represented by this content, possibly sparselinearIndex
- Additional index used to optimize queries
-
-
Method Detail
-
getReferenceSequence
public int getReferenceSequence()
Reference for this Content
-
containsBin
public boolean containsBin(Bin bin)
Does this content have anything in this bin?
-
getBins
public BinningIndexContent.BinList getBins()
- Returns:
- iterable list of bins represented by this content
-
getAllChunks
public List<Chunk> getAllChunks()
- Returns:
- all chunks associated with all bins in this content
-
getLinearIndex
public LinearIndex getLinearIndex()
- Returns:
- the linear index represented by this content
-
getChunksOverlapping
public List<Chunk> getChunksOverlapping(int startPos, int endPos)
- Parameters:
startPos
- 1-based, inclusiveendPos
- 1-based, inclusive- Returns:
- List of Chunks overlapping the given region. May return null if there are none.
-
-