Struct bio::io::fasta::IndexedReader
[−]
[src]
pub struct IndexedReader<R: Read + Seek> { pub index: Index, // some fields omitted }
A FASTA reader with an index as created by SAMtools (.fai).
Fields
index: Index
Methods
impl IndexedReader<File>
[src]
fn from_file<P: AsRef<Path>>(path: &P) -> Result<Self>
Read from a given file path. This assumes the index ref.fasta.fai to be present for FASTA ref.fasta.
impl<R: Read + Seek> IndexedReader<R>
[src]
fn new<I: Read>(fasta: R, fai: I) -> Result<Self>
Read from a FASTA and its index, both given as io::Read
. FASTA has to be io::Seek
in addition.
fn with_index(fasta: R, index: Index) -> Self
Read from a FASTA and its index, the first given as io::Read
, the second given as index object.
fn read_all(&mut self, seqname: &str, seq: &mut Text) -> Result<()>
For a given seqname, read the whole sequence into the given vector.
fn read(&mut self, seqname: &str, start: u64, stop: u64, seq: &mut Text) -> Result<()>
Read the given interval of the given seqname into the given vector (stop position is exclusive).