public class FastaSequenceIndexEntry
extends java.lang.Object
Constructor and Description |
---|
FastaSequenceIndexEntry(java.lang.String contig,
long location,
long size,
int basesPerLine,
int bytesPerLine,
int sequenceIndex)
Create a new entry with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Compare this index entry to another index entry.
|
int |
getBasesPerLine()
Gets the number of bases in a given line.
|
int |
getBytesPerLine()
How many bytes (bases + whitespace) are consumed by the
given line?
|
java.lang.String |
getContig()
Gets the contig associated with this entry.
|
long |
getLocation()
Gets the location of this contig within the fasta.
|
int |
getSequenceIndex() |
long |
getSize()
Gets the size, in bytes, of the data in the contig.
|
int |
hashCode()
In general, we expect one entry per contig, so compute the hash based only on the contig.
|
protected void |
setContig(java.lang.String contig)
Sometimes contigs need to be adjusted on-the-fly to
match sequence dictionary entries.
|
java.lang.String |
toString()
For debugging.
|
public FastaSequenceIndexEntry(java.lang.String contig, long location, long size, int basesPerLine, int bytesPerLine, int sequenceIndex)
contig
- Contig this entry represents.location
- Location (byte coordinate) in the fasta file.size
- The number of bases in the contig.basesPerLine
- How many bases are on each line.bytesPerLine
- How many bytes are on each line (includes newline characters).public java.lang.String getContig()
protected void setContig(java.lang.String contig)
contig
- New value for the contig.public long getLocation()
public long getSize()
public int getBasesPerLine()
public int getBytesPerLine()
public int getSequenceIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- another FastaSequenceIndexEntrypublic int hashCode()
hashCode
in class java.lang.Object