magnusdv / pedtools

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

`transferMarkers()` doesn't catch duplicated IDs #10

Closed magnusdv closed 5 years ago

magnusdv commented 5 years ago

Moved here from magnusdv/forrel#11

When ids is explicitly given, it appears that transferMarkers() doesn't check for duplicated IDs.

library(pedtools)
x = singleton("a")
x = setMarkers(x, marker(x, a = 1:2, name = "M"))

# Error as expected
transferMarkers(list(x,x), x)
#> Error: ID label is not unique: a

# This should give the same error
transferMarkers(list(x,x), x, ids = "a")
#>  id fid mid sex   M
#>   a   *   *   1 1/2

Created on 2018-11-08 by the reprex package (v0.2.1)