public class SRAIndexedSequenceFile extends java.lang.Object implements ReferenceSequenceFile
Modifier and Type | Field and Description |
---|---|
protected SAMSequenceDictionary |
sequenceDictionary |
Constructor and Description |
---|
SRAIndexedSequenceFile(SRAAccession acc) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ReferenceSequence |
getSequence(java.lang.String contig)
Retrieves the complete sequence described by this contig.
|
SAMSequenceDictionary |
getSequenceDictionary()
Must return a sequence dictionary with at least the following fields completed
for each sequence: name, length.
|
ReferenceSequence |
getSubsequenceAt(java.lang.String contig,
long start,
long stop)
Gets the subsequence of the contig in the range [start,stop]
|
boolean |
isIndexed() |
protected SAMSequenceDictionary |
loadSequenceDictionary() |
ReferenceSequence |
nextSequence()
Retrieves the next whole sequences from the file.
|
void |
reset()
Resets the ReferenceSequenceFile so that the next call to nextSequence() will return
the first sequence in the file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
protected SAMSequenceDictionary sequenceDictionary
public SRAIndexedSequenceFile(SRAAccession acc)
acc
- accessionpublic SAMSequenceDictionary getSequenceDictionary()
ReferenceSequenceFile
getSequenceDictionary
in interface ReferenceSequenceFile
public ReferenceSequence nextSequence()
ReferenceSequenceFile
nextSequence
in interface ReferenceSequenceFile
public void reset()
ReferenceSequenceFile
reset
in interface ReferenceSequenceFile
public boolean isIndexed()
isIndexed
in interface ReferenceSequenceFile
public ReferenceSequence getSequence(java.lang.String contig)
ReferenceSequenceFile
getSequence
in interface ReferenceSequenceFile
contig
- contig whose data should be returned.public ReferenceSequence getSubsequenceAt(java.lang.String contig, long start, long stop)
ReferenceSequenceFile
getSubsequenceAt
in interface ReferenceSequenceFile
contig
- Contig whose subsequence to retrieve.start
- inclusive, 1-based start of region.stop
- inclusive, 1-based stop of region.public void close() throws java.io.IOException
close
in interface ReferenceSequenceFile
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
protected SAMSequenceDictionary loadSequenceDictionary() throws ngs.ErrorMsg
ngs.ErrorMsg