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 TypeMethodDescriptionvoid
close()
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]boolean
protected SAMSequenceDictionary
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface htsjdk.samtools.reference.ReferenceSequenceFile
toString
-
Field Details
-
sequenceDictionary
-
-
Constructor Details
-
SRAIndexedSequenceFile
- Parameters:
acc
- accession
-
-
Method Details
-
getSequenceDictionary
Description copied from interface:ReferenceSequenceFile
Must return a sequence dictionary with at least the following fields completed for each sequence: name, length.- Specified by:
getSequenceDictionary
in interfaceReferenceSequenceFile
- Returns:
- a list of sequence records representing the sequences in this reference file
-
nextSequence
Description copied from interface:ReferenceSequenceFile
Retrieves the next whole sequences from the file.- Specified by:
nextSequence
in interfaceReferenceSequenceFile
- Returns:
- a ReferenceSequence or null if at the end of the file
-
reset
public void reset()Description copied from interface:ReferenceSequenceFile
Resets the ReferenceSequenceFile so that the next call to nextSequence() will return the first sequence in the file.- Specified by:
reset
in interfaceReferenceSequenceFile
-
isIndexed
public boolean isIndexed()- Specified by:
isIndexed
in interfaceReferenceSequenceFile
- Returns:
- true if getSequence and getSubsequenceAt methods are allowed.
-
getSequence
Description copied from interface:ReferenceSequenceFile
Retrieves the complete sequence described by this contig.- Specified by:
getSequence
in interfaceReferenceSequenceFile
- Parameters:
contig
- contig whose data should be returned.- Returns:
- The full sequence associated with this contig.
-
getSubsequenceAt
Description copied from interface:ReferenceSequenceFile
Gets the subsequence of the contig in the range [start,stop]- Specified by:
getSubsequenceAt
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceReferenceSequenceFile
- Throws:
IOException
-
loadSequenceDictionary
- Throws:
ngs.ErrorMsg
-