magnusdv / pedtools

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

`readPed()` fails when ID labels have spaces #29

Closed magnusdv closed 2 years ago

magnusdv commented 3 years ago
library(pedtools)
x = singleton("A B C")
tmp <- writePed(x, tempfile(), what = "ped")

readPed(tmp)
#> Error in read.table(pedfile, header = header, colClasses = "character", : more columns than column names
readPed(tmp, sep = "\t")
#> Error in read.table(pedfile, header = header, colClasses = "character", : more columns than column names

Created on 2021-08-27 by the reprex package (v2.0.1)

The correct solution readPed(..., sep = "\t") fails because the sep argument is already used for something else (separating alleles).

Rename to alleleSep?