GenerateVars: Generate variants of a given haplotype

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/GenerateVars.R

Description

Function to generate a set of variants for a given DNA sequence.

Usage

1
GenerateVars(seq, nhpl, max.muts, p.muts)

Arguments

seq

A character string with a DNA sequence from which to generate the variants.

nhpl

Number of haplotypes to generate.

max.muts

Maximum number of mutations in each sequence.

p.muts

Vector of length max.muts with the probability of each number of mutations, some of which may be 0.

Details

Given a DNA sequence, nhpl variant haplotypes are generated at random, with a maximum of max.muts substitutions each. The probability of the number of mutations in each haplotype generated is given by the vector p.muts. The positions of the mutations in each haplotype are independent and random.

Value

A character vector with nhpl haplotype variants of the seq sequence.

Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

See Also

GetRandomSeq, Diverge

Examples

1
2
3
4
set.seed(123)
m1 <- GetRandomSeq(50)

GenerateVars(m1,50,2,c(10,1))

QSutils documentation built on Nov. 8, 2020, 7:42 p.m.