magnusdv/pedtools

`getAlleles()` output and marker names

Closed this issue · 1 comments

The output from getAlleles() below is not as I expected.
The name given to the second marker, m2, appears to be ignored

#Case 2
library(pedtools)
s1 = singleton(1)
s2 = singleton(2)
m1 = marker(s1, name=  "locus", "1" = 1)
s1 = addMarkers(s1,m1)
m2 = marker(s2, name = "other locus", "2" = 2)
s2 = addMarkers(s2,m2)
getAlleles(list(s1,s2), ids =c("2", "1"))
#>   locus.1 locus.2
#> 1 "1"     "1"    
#> 2 "2"     "2"

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

Thanks, this is clearly not the intended behaviour. It seems getAlleles() doesn't handle pedigree lists where the components have different markers.