Diverge: Generate a set of diverging haplotypes

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

View source: R/Diverge.R

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

1
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

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

Example output

Loading required package: Biostrings
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package:BiostringsThe following object is masked frompackage:base:

    strsplit

[1] "GGGCGCGCGATCCACGTAGGATAAAGGCGCAAGTCAGGATGTCAGAACGG"
[2] ".....................................A............"
[3] "........................C............A............"
[4] "........................C........C...A............"

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