pub struct FastaReader {
pub chr_len_map: HashMap<String, usize>,
pub chr_tcga_map: HashMap<String, String>,
}Expand description
In-memory reference FASTA store.
The full chromosome sequence is kept as uppercase text because both Scan1 and Scan2 perform many short substring comparisons, and the reference size used by CIRI is small enough that this tradeoff is simpler and faster than on-demand I/O.
Fields§
§chr_len_map: HashMap<String, usize>Maps from chromosome name to its sequence length.
chr_tcga_map: HashMap<String, String>Maps from chromosome name (e.g., “chr1”) to its full uppercase sequence string.
Implementations§
Source§impl FastaReader
impl FastaReader
Sourcepub fn read_fasta(&mut self, fasta_file: &str) -> Result<()>
pub fn read_fasta(&mut self, fasta_file: &str) -> Result<()>
Reads reference sequences from a FASTA file.
needletail handles parsing, while this wrapper normalizes names and case
so later junction-validation code can use cheap byte/substring comparisons.
§Arguments
fasta_file- Path to the reference genome FASTA file.
Auto Trait Implementations§
impl Freeze for FastaReader
impl RefUnwindSafe for FastaReader
impl Send for FastaReader
impl Sync for FastaReader
impl Unpin for FastaReader
impl UnsafeUnpin for FastaReader
impl UnwindSafe for FastaReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more