# NOT RUN {
# define a pedigree of siblings S1 and S2 (and their parents)
ped_sibs <- pedtools::nuclearPed(children = c("S1", "S2"))
# define allele frequencies
freqs <- list(locus1 = c(0.1, 0.9),
locus2 = c(0.25, 0.5, 0.25))
# compute dist. of number of alleles for two siblings and one unrelated persons
pr_total_number_of_distinct_alleles(contributors = c("S1","S2","U1"), freqs,
pedigree = ped_sibs)
## GlobalFiler example (2 unrelated contributors)
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc.csv",
package = "numberofalleles"))
gf_loci <- c("D3S1358", "vWA", "D16S539", "CSF1PO", "TPOX", "D8S1179",
"D21S11", "D18S51", "D2S441", "D19S433", "TH01", "FGA",
"D22S1045", "D5S818", "D13S317", "D7S820", "SE33",
"D10S1248", "D1S1656", "D12S391", "D2S1338")
p_gf <- pr_total_number_of_distinct_alleles(contributors = c("U1", "U2"),
freqs = freqs, loci = gf_loci)
barplot(p_gf$pf)
# }
Run the code above in your browser using DataLab