makeAverage1merSub {shazam} | R Documentation |
Make a 1-mer substitution model by averaging over a 5-mer substitution model
Description
makeAverage1merSub
averages substitution rates in a 5-mer substitution model
to derive a 1-mer substitution model.
Usage
makeAverage1merSub(sub5mer)
Arguments
sub5mer |
a 4x1024 matrix such as that returned by
|
Details
For example, the substitution rate from "A" to "T" in the resultant 1-mer model is derived by averaging the substitution rates into a "T" of all the 5-mers that have an "A" as their central 1-mer.
Value
A 4x4 matrix with row names representing nucleotides to mutate from and column names representing nucleotides to mutate into. Rates are normalized by row.
See Also
See makeDegenerate5merSub for making a degenerate 5-mer substitution model based on a 1-mer substitution model.
Examples
# Make a degenerate 5-mer model (4x1024) based on HKL_S1F (4x4)
degenerate5merSub <- makeDegenerate5merSub(sub1mer = HKL_S1F)
# Now make a 1-mer model by averaging over the degenerate 5-mer model
# Expected to get back HKL_S1F
makeAverage1merSub(sub5mer = degenerate5merSub)