Struct pattern_partition_prediction::PaPaPred[][src]

pub struct PaPaPred { /* fields omitted */ }
Expand description

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

Create a PaPaPred instance.

The input file must consist of 3 space-separated columns:

  1. The substitution in the form X->Y where X, Y in {ACGT}
  2. The pattern in UIPAC notation.
  3. The probability for the substitution with that pattern

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.

Query the mutation rates for a sequence context

The middle position of the seq is assumed to be mutating.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.