GenerateVars {QSutils} | R Documentation |
Function to generate a set of variants for a given DNA sequence.
GenerateVars(seq, nhpl, max.muts, p.muts)
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 |
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.
A character vector with nhpl
haplotype variants of the seq
sequence.
Mercedes Guerrero-Murillo and Josep Gregori
set.seed(123) m1 <- GetRandomSeq(50) GenerateVars(m1,50,2,c(10,1))