Learn R Programming

shazam (version 0.1.8)

shmulateSeq: Simulate mutations in a single sequence

Description

Generates random mutations in a sequence iteratively using a targeting model. Targeting probabilities at each position are updated after each iteration.

Usage

shmulateSeq(sequence, mutations, targetingModel = HH_S5F)

Arguments

sequence

sequence string in which mutations are to be introduced.

mutations

number of mutations to be introduced into sequence.

targetingModel

5-mer TargetingModel object to be used for computing probabilities of mutations at each position. Defaults to HH_S5F.

Value

A string defining the mutated sequence.

See Also

See shmulateTree for imposing mutations on a lineage tree. See HH_S5F and MK_RS5NF for predefined TargetingModel objects.

Examples

Run this code
# NOT RUN {
# Define example input sequence
sequence <- "NGATCTGACGACACGGCCGTGTATTACTGTGCGAGAGATAGTTTA"

# Simulate using the default human 5-mer targeting model
shmulateSeq(sequence, mutations=6)

# }

Run the code above in your browser using DataLab