Diverge {QSutils} | R Documentation |
Generates a set of diverging haplotypes from the given DNA sequence. The haplotypes produced share a pattern of divergence with an increasing number of mutations.
Diverge(vm, seq)
vm |
Vector with number of diverging mutations to be generated. |
seq |
Reference sequence from which to generate the variants. |
max(vm)
Positions in the given sequence are randomly generated.
A substitution is also randomly produced for each of these positions.
A haplotype is generated for each element in vm
, so that it contains
vm[i]
substitutions of those previously generated.
Character string vector with the segregating haplotypes generated.
Mercedes Guerrero-Murillo and Josep Gregori
set.seed(123) m1 <- GetRandomSeq(50) hpl <- Diverge(3:6,m1) DottedAlignment(DNAStringSet(hpl))