[−][src]Struct pattern_partition_prediction::PaPaPred
A pattern partition prediction lookup table
Use the new
method to read in a sequence-context point mutation probabilities file.
This file has the following format:
A->C ANAANVY 9.624201240304532e-06
A->C BNAANVY 7.1908831554369445e-06
A->C KNAANVR 5.345747358414394e-06
A->C MNAANVR 7.589541872637903e-06
A->C NAAAVTN 7.0416965447897126e-06
[and so on]
Each column is separated by a single space. The first column is the point mutation. The second column is the sequence context where the mutation takes place (UIPAC notation) The third column is the point mutation rate with this context
The reverse complement is handled automatically. All sequence must be different (even when you expand the UIPAC code)
Implementations
impl PaPaPred
[src]
pub fn new<P: AsRef<Path>>(
path: P,
min_kmer_size: Option<usize>
) -> Result<PaPaPred, Error>
[src]
path: P,
min_kmer_size: Option<usize>
) -> Result<PaPaPred, Error>
Create a PaPaPred instance.
You provide the path
to the sequence-context point mutation probabilities file.
If you want to ensure that the patters have a minimum size, you can provide a value for
min_kmer_size
which will pad all patterns with Ns at the end. The minimum kmer size has
to be an odd number because there has to be a single mutated base in the center of the
sequence.
pub fn rates(&self, seq: &str) -> Result<SubstitutionRates, Error>
[src]
Query the mutation rates for a sequence context
The middle position of the seq
is assumed to be mutating.
pub fn kmer_size(&self) -> usize
[src]
pub fn radius(&self) -> usize
[src]
Auto Trait Implementations
impl RefUnwindSafe for PaPaPred
impl Send for PaPaPred
impl Sync for PaPaPred
impl Unpin for PaPaPred
impl UnwindSafe for PaPaPred
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,