Learn R Programming

shazam (version 0.1.9)

extendSubstitutionMatrix: Extends a substitution model to include Ns.

Description

extendSubstitutionMatrix extends a 5-mer nucleotide substitution model with 5-mers that include Ns by averaging over all corresponding 5-mers without Ns.

Usage

extendSubstitutionMatrix(substitutionModel)

Arguments

substitutionModel

matrix of 5-mers substitution counts built by createSubstitutionMatrix.

Value

A 5x3125 matrix of normalized substitution rate for each 5-mer motif with rows names defining the center nucleotide, one of c("A", "C", "G", "T", "N"), and column names defining the 5-mer nucleotide sequence.

See Also

createSubstitutionMatrix, extendMutabilityMatrix

Examples

Run this code
# NOT RUN {
# Subset example data to one isotype and sample as a demo
data(ExampleDb, package="alakazam")
db <- subset(ExampleDb, ISOTYPE == "IgA" & SAMPLE == "-1h")

# Create model using only silent mutations
sub_model <- createSubstitutionMatrix(db, model="S")
ext_model <- extendSubstitutionMatrix(sub_model)

# }

Run the code above in your browser using DataLab