bedtools genomecov -bg -split -ibam bamfile. error: the input file is not sorted correctly.
1
0
Entering edit mode
6.8 years ago
Joe ▴ 40

Hi there,

I try to run command "bedtools genomecov -bg -split -ibam bamfile" to obtain the bed output, while the error is showed as "Input error: Chromosome * found in non-sequential lines. This suggests that the input file is not sorted correctly." To solve that, I try to sort the bam file using "samtools sort -n bamfile -o sortedfile" and then redo the test. The result have the same error.

Anyone can help? Many thanks!

Joe

software error • 2.9k views
ADD COMMENT
3
Entering edit mode
6.8 years ago

Hello,

I guess bedtools need the bam file sorted by coordinates and not by readnames as you do with samtools sort -n. And did you use sortedfile for redoing yohr test?

fin swimmer

ADD COMMENT
0
Entering edit mode

Hi finswimmer,

Thanks for your comment. It works after sorting the bam file by coordinates.

Joe

ADD REPLY

Login before adding your answer.

Traffic: 1291 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