public interface AlignmentReader extends Closeable, Iterator<Alignments.AlignmentEntry>, Iterable<Alignments.AlignmentEntry>
| Modifier and Type | Method and Description |
|---|---|
String |
basename()
Returns the basename for the alignment being read, or null if the basename is unknown.
|
void |
close() |
String |
getAlignerName()
Return the name of the aligner that produced this alignment.
|
String |
getAlignerVersion()
Return the version of the aligner that produced this alignment.
|
int |
getConstantQueryLength() |
long |
getEndByteOffset(int startReferenceIndex,
int startPosition,
int endReferenceIndex,
int endPosition)
Obtain the byte offset at the end of the chunk with entries at or before the given genomic end position.
|
int |
getLargestSplitQueryIndex() |
it.unimi.dsi.fastutil.objects.ObjectList<ReferenceLocation> |
getLocations(int modulo)
Returns a sample of locations covered by this alignment.
|
it.unimi.dsi.fastutil.objects.ObjectList<ReferenceLocation> |
getLocationsByBytes(int bytesPerSlice)
Returns a sample of locations covered by this alignment.
|
ReferenceLocation |
getMaxLocation()
Return the maximum location in this alignment.
|
ReferenceLocation |
getMinLocation()
Return the minimum location in this alignment.
|
int |
getNumberOfAlignedReads()
Obtain the number of aligned reads from the header.
|
int |
getNumberOfQueries() |
int |
getNumberOfTargets() |
edu.cornell.med.icb.identifier.IndexedIdentifier |
getQueryIdentifiers() |
boolean |
getQueryIndicesWerePermuted()
Indicate whether query indices are small indices.
|
ReadOriginInfo |
getReadOriginInfo()
Return the read origin infos from the header.
|
int |
getSmallestSplitQueryIndex() |
long |
getStartByteOffset(int startReferenceIndex,
int startPosition)
Obtain the byte offset at the start of the chunk with entries at or after the given genomic position.
|
Properties |
getStatistics()
Obtain statistics asssociated with the alignment.
|
edu.cornell.med.icb.identifier.IndexedIdentifier |
getTargetIdentifiers() |
int[] |
getTargetLength() |
boolean |
hasAmbiguity()
This field is true when entries in the alignment .entries file all have the ambiguity field populated
(Since Goby 2.0).
|
boolean |
hasNext()
Returns true if the input has more entries.
|
boolean |
hasQueryIndexOccurrences()
This field is true when entries in the alignment .entries file all have the query_index_occurences field populated
(Since Goby 2.0).
|
boolean |
isConstantQueryLengths() |
boolean |
isIndexed()
Returns true if this alignment is indexed.
|
boolean |
isQueryLengthStoredInEntries()
Indicates if query lengths are stored in alignment entries (True) or in the alignment header (alignments produced with goby 1.7-, False).
|
boolean |
isSorted()
Returns whether this alignment is sorted.
|
Iterator<Alignments.AlignmentEntry> |
iterator() |
Alignments.AlignmentEntry |
next()
Returns the next alignment entry from the input stream.
|
void |
readHeader()
Read the header of this alignment.
|
void |
readIndex()
Read the index.
|
void |
remove()
This operation is not supported.
|
void |
reposition(int targetIndex,
int position)
Reposition the reader to a new target sequence and start position.
|
Alignments.AlignmentEntry |
skipTo(int targetIndex,
int position)
Skip all entries that have position before (targetIndex,position).
|
forEachRemainingforEach, spliteratorboolean isSorted()
boolean isIndexed()
String basename()
boolean hasNext()
hasNext in interface Iterator<Alignments.AlignmentEntry>Alignments.AlignmentEntry next()
next in interface Iterator<Alignments.AlignmentEntry>Alignments.AlignmentEntry skipTo(int targetIndex, int position) throws IOException
targetIndex - The index of the target sequence to skip to.position - The position on the target sequence.IOException - If an error occurs reading the alignment header. The header is accessed to check that the alignment is sorted.void reposition(int targetIndex,
int position)
throws IOException
targetIndex - Index of the target sequence to reposition to.position - Position in the target sequence to reposition to.IOException - If an error occurs repositioning.void remove()
remove in interface Iterator<Alignments.AlignmentEntry>void readHeader()
throws IOException
IOException - If an error occurs.void readIndex()
throws IOException
IOException - If an error occurs loading the index or header.void close()
close in interface AutoCloseableclose in interface CloseableIterator<Alignments.AlignmentEntry> iterator()
iterator in interface Iterable<Alignments.AlignmentEntry>Properties getStatistics()
int getNumberOfAlignedReads()
it.unimi.dsi.fastutil.objects.ObjectList<ReferenceLocation> getLocations(int modulo) throws IOException
modulo - Modulo to avoid sampling every position in the genome.IOExceptionReferenceLocation getMinLocation() throws IOException
IOExceptionReferenceLocation getMaxLocation() throws IOException
IOExceptionit.unimi.dsi.fastutil.objects.ObjectList<ReferenceLocation> getLocationsByBytes(int bytesPerSlice) throws IOException
bytesPerSlice - Return locations approximately spaced by this number of compressed bytes.IOExceptionboolean isQueryLengthStoredInEntries()
String getAlignerName()
String getAlignerVersion()
int getSmallestSplitQueryIndex()
int getLargestSplitQueryIndex()
edu.cornell.med.icb.identifier.IndexedIdentifier getTargetIdentifiers()
int[] getTargetLength()
int getNumberOfTargets()
int getNumberOfQueries()
boolean isConstantQueryLengths()
int getConstantQueryLength()
edu.cornell.med.icb.identifier.IndexedIdentifier getQueryIdentifiers()
long getStartByteOffset(int startReferenceIndex,
int startPosition)
startReferenceIndex - Index of the reference sequence for the genomic position.startPosition - genomic coordinate in the reference sequence.boolean getQueryIndicesWerePermuted()
boolean hasQueryIndexOccurrences()
boolean hasAmbiguity()
long getEndByteOffset(int startReferenceIndex,
int startPosition,
int endReferenceIndex,
int endPosition)
startReferenceIndex - Index of the reference sequence for the start genomic position.startPosition - start genomic coordinate in the reference sequence.endReferenceIndex - Index of the reference sequence for the end genomic position.endPosition - end genomic coordinate in the reference sequence.ReadOriginInfo getReadOriginInfo()
Copyright © 2017 Campagne Laboratory. All rights reserved.