Struct bio::data_structures::fmindex::FMIndex
source · pub struct FMIndex<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> { /* private fields */ }
Expand description
The Fast Index in Minute space (FM-Index, Ferragina and Manzini, 2000) for finding suffix array intervals matching a given pattern.
Implementations
sourceimpl<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> FMIndex<DBWT, DLess, DOcc>
impl<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> FMIndex<DBWT, DLess, DOcc>
sourcepub fn new(bwt: DBWT, less: DLess, occ: DOcc) -> Self
pub fn new(bwt: DBWT, less: DLess, occ: DOcc) -> Self
Construct a new instance of the FM index.
Arguments
sa
- the suffix array (or sample)bwt
- the BWTk
- the sampling rate of the occ array: every k-th entry will be stored (higher k means less memory usage, but worse performance)alphabet
- the alphabet of the underlying text, omitting the sentinel
Trait Implementations
sourceimpl<'de, DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> Deserialize<'de> for FMIndex<DBWT, DLess, DOcc>where
DBWT: Deserialize<'de>,
DLess: Deserialize<'de>,
DOcc: Deserialize<'de>,
impl<'de, DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> Deserialize<'de> for FMIndex<DBWT, DLess, DOcc>where
DBWT: Deserialize<'de>,
DLess: Deserialize<'de>,
DOcc: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> FMIndexable for FMIndex<DBWT, DLess, DOcc>
impl<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> FMIndexable for FMIndex<DBWT, DLess, DOcc>
sourcefn backward_search<'b, P: Iterator<Item = &'b u8> + DoubleEndedIterator>(
&self,
pattern: P
) -> Interval
fn backward_search<'b, P: Iterator<Item = &'b u8> + DoubleEndedIterator>(
&self,
pattern: P
) -> Interval
Perform backward search, yielding suffix array
interval denoting exact occurrences of the given pattern of length m in the text.
Complexity: O(m). Read more
sourceimpl<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> From<FMIndex<DBWT, DLess, DOcc>> for FMDIndex<DBWT, DLess, DOcc>
impl<DBWT: Borrow<BWT>, DLess: Borrow<Less>, DOcc: Borrow<Occ>> From<FMIndex<DBWT, DLess, DOcc>> for FMDIndex<DBWT, DLess, DOcc>
sourcefn from(fmindex: FMIndex<DBWT, DLess, DOcc>) -> FMDIndex<DBWT, DLess, DOcc>
fn from(fmindex: FMIndex<DBWT, DLess, DOcc>) -> FMDIndex<DBWT, DLess, DOcc>
Construct a new instance of the FMD index (see Heng Li (2012) Bioinformatics).
This expects a BWT that was created from a text over the DNA alphabet with N
(alphabets::dna::n_alphabet()
) consisting of the
concatenation with its reverse complement, separated by the sentinel symbol $
.
I.e., let T be the original text and R be its reverse complement.
Then, the expected text is T$R$. Further, multiple concatenated texts are allowed, e.g.
T1$R1$T2$R2$T3$R3$.
Auto Trait Implementations
impl<DBWT, DLess, DOcc> RefUnwindSafe for FMIndex<DBWT, DLess, DOcc>where
DBWT: RefUnwindSafe,
DLess: RefUnwindSafe,
DOcc: RefUnwindSafe,
impl<DBWT, DLess, DOcc> Send for FMIndex<DBWT, DLess, DOcc>where
DBWT: Send,
DLess: Send,
DOcc: Send,
impl<DBWT, DLess, DOcc> Sync for FMIndex<DBWT, DLess, DOcc>where
DBWT: Sync,
DLess: Sync,
DOcc: Sync,
impl<DBWT, DLess, DOcc> Unpin for FMIndex<DBWT, DLess, DOcc>where
DBWT: Unpin,
DLess: Unpin,
DOcc: Unpin,
impl<DBWT, DLess, DOcc> UnwindSafe for FMIndex<DBWT, DLess, DOcc>where
DBWT: UnwindSafe,
DLess: UnwindSafe,
DOcc: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more