Author Topic: No tabs found in BED row.  (Read 4148 times)

claudius

  • Newbie
  • *
  • Posts: 1
No tabs found in BED row.
« on: October 20, 2017, 10:50:28 AM »
Hi,

when I run the following command:

Code: [Select]
bedmap --ec --mean <(awk 'BEGIN{OFS="\t"}{$3-=40; print}' BAM/Big_Data_ref.fa.bed | sort -k1,1) Big_Data_ref_mappability.wig.bed > Big_Data_ref_mappability.mean.bed

... I get the following error message:

Quote
Error: in /dev/fd/63
No tabs found in BED row.
See row: 1

However, running:

Code: [Select]
awk 'BEGIN{OFS="\t"}{$3-=40; print}' BAM/Big_Data_ref.fa.bed | sort -k1,1 | head | cat -t
shows:

Quote
Contig_1^I1^I195
Contig_10^I1^I157
Contig_1000^I1^I208
Contig_100000^I1^I174

So my reference bed file should be tab delimited.

What's going wrong here?

claudius

AlexReynolds

  • Administrator
  • Jr. Member
  • *****
  • Posts: 72
Re: No tabs found in BED row.
« Reply #1 on: October 20, 2017, 11:12:54 AM »
Hello,

Can you please replace sort -k1,1 with sort-bed -? (Please include the hyphen.) I'm not sure why you get that error, but it does look like your data might not be sorted correctly, and so that is something you'd want to change, in any case.

You can use cat -te to check for both tab and newline characters. If your BED files come from Excel or Windows, there could be additional carriage-return characters in there that would cause problems with parsing.

If you can share the files BAM/Big_Data_ref.fa.bed and Big_Data_ref_mappability.wig.bed, that would be helpful, as well as what version of the toolkit you are using, and on what platform you're running things.