public class FastaSequenceFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
file |
protected SAMSequenceDictionary |
sequenceDictionary |
Constructor and Description |
---|
FastaSequenceFile(java.io.File file,
boolean truncateNamesAtWhitespace)
Constructs a FastaSequenceFile that reads from the specified file.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
It's good to call this to free up memory.
|
protected static java.io.File |
findSequenceDictionary(java.io.File file) |
ReferenceSequence |
getSequence(java.lang.String contig)
default implementation -- override if index is supported
|
SAMSequenceDictionary |
getSequenceDictionary()
Returns the list of sequence records associated with the reference sequence if found
otherwise null.
|
ReferenceSequence |
getSubsequenceAt(java.lang.String contig,
long start,
long stop)
default implementation -- override if index is supported
|
boolean |
isIndexed()
default implementation -- override if index is supported
|
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.
|
java.lang.String |
toString()
Returns the full path to the reference file.
|
protected final java.io.File file
protected SAMSequenceDictionary sequenceDictionary
public FastaSequenceFile(java.io.File file, boolean truncateNamesAtWhitespace)
public void close()
public ReferenceSequence nextSequence()
ReferenceSequenceFile
public void reset()
ReferenceSequenceFile
protected static java.io.File findSequenceDictionary(java.io.File file)
public SAMSequenceDictionary getSequenceDictionary()
getSequenceDictionary
in interface ReferenceSequenceFile
public java.lang.String toString()
toString
in interface ReferenceSequenceFile
toString
in class java.lang.Object
public boolean isIndexed()
isIndexed
in interface ReferenceSequenceFile
public ReferenceSequence getSequence(java.lang.String contig)
getSequence
in interface ReferenceSequenceFile
contig
- contig whose data should be returned.public ReferenceSequence getSubsequenceAt(java.lang.String contig, long start, long stop)
getSubsequenceAt
in interface ReferenceSequenceFile
contig
- Contig whose subsequence to retrieve.start
- inclusive, 1-based start of region.stop
- inclusive, 1-based stop of region.