Package htsjdk.samtools.sra
Class SRAIndexedSequenceFile
java.lang.Object
htsjdk.samtools.sra.SRAIndexedSequenceFile
- All Implemented Interfaces:
ReferenceSequenceFile,Closeable,AutoCloseable
Allows reading Reference data from SRA
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getSequence(String contig) Retrieves the complete sequence described by this contig.Must return a sequence dictionary with at least the following fields completed for each sequence: name, length.getSubsequenceAt(String contig, long start, long stop) Gets the subsequence of the contig in the range [start,stop]booleanprotected SAMSequenceDictionaryRetrieves the next whole sequences from the file.voidreset()Resets the ReferenceSequenceFile so that the next call to nextSequence() will return the first sequence in the file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface htsjdk.samtools.reference.ReferenceSequenceFile
toString
-
Field Details
-
sequenceDictionary
-
-
Constructor Details
-
SRAIndexedSequenceFile
- Parameters:
acc- accession
-
-
Method Details
-
getSequenceDictionary
Description copied from interface:ReferenceSequenceFileMust return a sequence dictionary with at least the following fields completed for each sequence: name, length.- Specified by:
getSequenceDictionaryin interfaceReferenceSequenceFile- Returns:
- a list of sequence records representing the sequences in this reference file
-
nextSequence
Description copied from interface:ReferenceSequenceFileRetrieves the next whole sequences from the file.- Specified by:
nextSequencein interfaceReferenceSequenceFile- Returns:
- a ReferenceSequence or null if at the end of the file
-
reset
public void reset()Description copied from interface:ReferenceSequenceFileResets the ReferenceSequenceFile so that the next call to nextSequence() will return the first sequence in the file.- Specified by:
resetin interfaceReferenceSequenceFile
-
isIndexed
public boolean isIndexed()- Specified by:
isIndexedin interfaceReferenceSequenceFile- Returns:
- true if getSequence and getSubsequenceAt methods are allowed.
-
getSequence
Description copied from interface:ReferenceSequenceFileRetrieves the complete sequence described by this contig.- Specified by:
getSequencein interfaceReferenceSequenceFile- Parameters:
contig- contig whose data should be returned.- Returns:
- The full sequence associated with this contig.
-
getSubsequenceAt
Description copied from interface:ReferenceSequenceFileGets the subsequence of the contig in the range [start,stop]- Specified by:
getSubsequenceAtin interfaceReferenceSequenceFile- Parameters:
contig- Contig whose subsequence to retrieve.start- inclusive, 1-based start of region.stop- inclusive, 1-based stop of region.- Returns:
- The partial reference sequence associated with this range.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReferenceSequenceFile- Throws:
IOException
-
loadSequenceDictionary
- Throws:
ngs.ErrorMsg
-