magnusdv / pedtools

Tools for working with pedigrees in R
GNU General Public License v3.0
23 stars 3 forks source link

Check for duplicated allele names? #28

Closed thoree closed 4 years ago

thoree commented 4 years ago
library(pedprobr)
#> Loading required package: pedtools
x = nuclearPed()
m1 = marker(x,"1" = "a/a",   afreq = c(a = 0.9, a = 0.1))
likelihood(x,m1)
#> [1] 0.81

Created on 2020-08-02 by the reprex package (v0.3.0)

magnusdv commented 4 years ago

Duplicated allele labels are now caught in marker creation:

library(pedtools)

x = singleton(1)
marker(x, afreq = c(a = 0.1, a = 0.9))
#> Error: Duplicated allele label: a

Created on 2020-08-02 by the reprex package (v0.3.0)