Can rtracklayer import tab-delimited BED files with unquoted spaces in fields?
1
0
Entering edit mode
@ryan-c-thompson-5618
Last seen 11 weeks ago
Icahn School of Medicine at Mount Sinaiā€¦

I have a BED file from an external data source that is tab-separated with spaces in the name field for some rows. These fields are not quoted. Looking at the code for rtracklayer::import.bed, it seems to use read.table with the default separator argument and no option to change it, which means all whitespace is treated as field separators. This causes the import to fail. Would it be possible to add an option to specify the separator when importing BED files?

rtracklayer bed software error • 1.3k views
ADD COMMENT
1
Entering edit mode
@michael-lawrence-3846
Last seen 3.1 years ago
United States

I just pushed a change to devel that expects all BED files to be tab-separated. That's what the spec says, and it's what bedtools requires, so hopefully it does not cause too much havoc.

ADD COMMENT
0
Entering edit mode

Sounds good to me.

ADD REPLY

Login before adding your answer.

Traffic: 587 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6