simProfile: DNA Profile Simulator

Description Usage Arguments Details Value See Also Examples

View source: R/simProfile.r

Description

Simulates DNA profiles.

Usage

1
2
simProfile(data = NULL, kit = NULL, sim = 1, name = NULL, db = NULL,
  debug = FALSE)

Arguments

data

data.frame with columns 'Marker' and 'Allele' (creates fixed profiles).

kit

character string to specify the typing kit (if kit=NULL all markers in db will be used).

sim

integer to specify the number of replicates or random profiles.

name

character string giving the sample base name ('Sim' is appended).

db

data.frame with the allele frequency database (used if data=NULL to create random profiles).

debug

logical TRUE to indicate debug mode.

Details

There are three ways to create DNA profiles: 1) Simulate DNA profiles of the selected kit using allele frequencies from the provided db. 2) Simulate DNA profiles using all available markers and allele frequencies from the provided db. 3) Provide a data.frame with a fixed DNA profile. sim random profiles or sim replicates are created. The resulting data.frame can be used as input to simSample. NB! Homozygous alleles must be specified two times e.g. 16, 16.

Value

data.frame with columns 'Sample.Name', 'Marker', 'Allele', 'Sim'.

See Also

simSample

Examples

1
2
3
4
5
6
7
8
# Create a data frame with a DNA profile.
markers = rep(c("D3S1358","TH01","FGA"), each=2)
alleles = c(15,18,6,10,25,25)
df <- data.frame(Marker=markers, Allele=alleles)

# Simulate sample
res <- simProfile(data=df, sim=10, name="Test")
print(res)

pcrsim documentation built on May 29, 2017, 3:53 p.m.