deletion_mutator: Randomly delete nucleotides in a sequence

Description Usage Arguments Value Examples

Description

Pass in a vector of nucleotides, the probability of single nucleotide deletions for each of the four nucleotides, and return a new vector of nucleotides.

Usage

1
2
deletion_mutator(nt_sequence, deletion_rate_A = 0.05,
  deletion_rate_T = 0.05, deletion_rate_C = 0.05, deletion_rate_G = 0.05)

Arguments

nt_sequence

A vector of nucleotides, i.e. c("C","A","T","G","A").

deletion_rate_A

The probability of an "A" deletion occurring.

deletion_rate_T

The probability of an "T" deletion occurring.

deletion_rate_C

The probability of an "C" deletion occurring.

deletion_rate_G

The probability of an "G" deletion occurring.

Value

A vector of nucleotides, i.e. c("C","T","G","A"), with deleted nucleotides omitted.

Examples

1
2
3
4
5
6
7
8
set.seed(1)
deletion_mutator(
c("C","A","T","G","A"),
deletion_rate_A = 0.05,
deletion_rate_T = 0.05,
deletion_rate_C = 0.05,
deletion_rate_G = 0.05
)

zcolburn/evolution documentation built on May 19, 2019, 1:48 a.m.