Package htsjdk.samtools.cram
Class CRAIEntry
- java.lang.Object
-
- htsjdk.samtools.cram.CRAIEntry
-
- All Implemented Interfaces:
Cloneable,Comparable<CRAIEntry>
public class CRAIEntry extends Object implements Comparable<CRAIEntry>, Cloneable
A class representing CRAI index entry: file and alignment offsets for each slice. Created by vadim on 10/08/2015.
-
-
Field Summary
Fields Modifier and Type Field Description intalignmentSpanintalignmentStartstatic Comparator<CRAIEntry>byEndstatic Comparator<CRAIEntry>byStartstatic Comparator<CRAIEntry>byStartDesclongcontainerStartOffsetintsequenceIdintsliceIndexintsliceOffsetintsliceSize
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CRAIEntryclone()intcompareTo(CRAIEntry o)static List<CRAIEntry>fromContainer(Container container)static booleanintersect(CRAIEntry e0, CRAIEntry e1)StringtoString()voidwriteToStream(OutputStream os)Serialize the entry to a CRAI index stream.
-
-
-
Field Detail
-
sequenceId
public int sequenceId
-
alignmentStart
public int alignmentStart
-
alignmentSpan
public int alignmentSpan
-
containerStartOffset
public long containerStartOffset
-
sliceOffset
public int sliceOffset
-
sliceSize
public int sliceSize
-
sliceIndex
public int sliceIndex
-
byEnd
public static Comparator<CRAIEntry> byEnd
-
byStart
public static final Comparator<CRAIEntry> byStart
-
byStartDesc
public static Comparator<CRAIEntry> byStartDesc
-
-
Constructor Detail
-
CRAIEntry
public CRAIEntry()
-
CRAIEntry
public CRAIEntry(String line) throws CRAIIndex.CRAIIndexException
Create a CRAI Entry from a serialized CRAI index line.- Parameters:
line- string formatted as a CRAI index entry- Throws:
CRAIIndex.CRAIIndexException
-
-
Method Detail
-
writeToStream
public void writeToStream(OutputStream os)
Serialize the entry to a CRAI index stream.- Parameters:
os- stream to write to
-
compareTo
public int compareTo(CRAIEntry o)
- Specified by:
compareToin interfaceComparable<CRAIEntry>
-
clone
public CRAIEntry clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-