Question: bedtools genomecov -bg -split -ibam bamfile. error: the input file is not sorted correctly.
0
gravatar for Joe
2.6 years ago by
Joe40
Vancouver
Joe40 wrote:

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 • 1.3k views
ADD COMMENTlink written 2.6 years ago by Joe40
3
gravatar for finswimmer
2.6 years ago by
finswimmer13k
Germany
finswimmer13k wrote:

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 COMMENTlink written 2.6 years ago by finswimmer13k

Hi finswimmer,

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

Joe

ADD REPLYlink written 2.6 years ago by Joe40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2121 users visited in the last hour