Skip to content

write_plink fails when .bed table has column names with whitespace, suggest to trim the column names #10

@richelbilderbeek

Description

@richelbilderbeek

Dear genio maintainers,

Thanks for genio and its many tests.

Here, I can only give a partial report, but I am willing to make a complete one.

When I use PLINK to convert PLINK text files to PLINK binary files, the column names get whitespace added when there are more than 9 entries.

This is a problem when doing write_plink:

 Error in genio::write_plink(file = base_input_filename, X = bed_table,  : 
  Column names in genotype matrix do not agree with FAM `id` column! 

I enjoy the strict checking, yet in this case it is noise. I suggest to compare the trimmed column names with the .fam table's id column.

There is an obvious workaround; before I call genio::write_plink, one can use ...

colnames(bed_table) <- stringr::str_trim(colnames(bed_table))

... but I feel this should be in genio instead, as genio is a great package :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions