Learn R Programming

shazam (version 0.1.4)

calcTargetingDistance: Calculates a 5-mer distance matrix from a TargetingModel object

Description

calcTargetingDistance converts the targeting rates in a TargetingModel model to a matrix of 5-mer to single-nucleotide mutation distances.

Usage

calcTargetingDistance(model)

Arguments

model
TargetingModel object with mutation likelihood information.

Value

A matrix of distances for each 5-mer motif with rows names defining the center nucleotide and column names defining the 5-mer nucleotide sequence.

Details

The targeting model is transformed into a distance matrix by:
  1. Converting the likelihood of being mutated $p=mutability*substitution$ to distance $d=-log10(p)$.
  2. Dividing this distance by the mean of the distances
  3. Converting all infinite, no change (e.g., A->A), and NA distances to zero.

See Also

Takes as input a TargetingModel object. See createTargetingModel for building a model.

Examples

Run this code
# Calculate targeting distance of HS5FModel
dist <- calcTargetingDistance(HS5FModel)

Run the code above in your browser using DataLab