[][src]Struct pattern_partition_prediction::PaPaPred

pub struct PaPaPred { /* fields omitted */ }

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.