Closed thoree closed 5 years ago
In the first case below getAlleles() output is not sorted according to the names of individuals, as expected. In the second case the output is sorted
getAlleles()
# Case 1 library(pedtools) x = nuclearPed(1, father = "a", mother ="b") m = marker(x, a = 1, b = 2) x = addMarkers(x, m) getAlleles(x, c("b", "a")) #> na1.1 na1.2 #> b "2" "2" #> a "1" "1" #Case 2 s1 = singleton(1) s2 = singleton(2) m1 = marker(s1, name = "l1", "1" = 1) s1 = addMarkers(s1,m1) m2 = marker(s2, name = "l1", "2" = 2) s2 = addMarkers(s2, m2) getAlleles(list(s1,s2), ids = c("2", "1")) #> l1.1 l1.2 #> 1 "1" "1" #> 2 "2" "2"
Created on 2018-11-24 by the reprex package (v0.2.1)
Ok, thanks - I appreciate the clear/minimal reprex. This is closely related to, and should fixed together with, #14.
In the first case below
getAlleles()
output is not sorted according to the names of individuals, as expected. In the second case the output is sortedCreated on 2018-11-24 by the reprex package (v0.2.1)