magnusdv / forrel

Forensic pedigree analysis and relatedness inference
GNU General Public License v2.0
10 stars 0 forks source link

Internal order and `markerSim` #14

Closed thoree closed 5 years ago

thoree commented 5 years ago

Here's an error message I first ran into using profileSim

library(forrel, quietly = TRUE)
x = data.frame(id = 1:3, fid = c(3,0,0), mid = c(2,0,0),  sex = c(1, 2, 1))
x = as.ped(x)
m = marker(x, "3" = 1:2)
x = addMarkers(x, m)
markerSim(x, partialmarker = 1)
#> Note: Changing the internal order so that all parents precede their children.
#> Error: Input is not a `marker` object

This works with x = data.frame(id = 1:3, fid = c(0,0,1), mid = c(0,0,2), sex = c(1, 2, 1)) Created on 2019-01-12 by the reprex package (v0.2.1)