Diverge: Generate a set of diverging haplotypes

View source: R/Diverge.R

DivergeR Documentation

Generate a set of diverging haplotypes

Description

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.

Usage

Diverge(vm, seq)

Arguments

vm

Vector with number of diverging mutations to be generated.

seq

Reference sequence from which to generate the variants.

Details

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.

Value

Character string vector with the segregating haplotypes generated.

Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

See Also

GetRandomSeq

Examples

set.seed(123)
m1 <- GetRandomSeq(50)
hpl <- Diverge(3:6,m1)
DottedAlignment(DNAStringSet(hpl))

VHIRHepatiques/QSutils documentation built on April 27, 2024, 10:29 p.m.