Unable to convert from sam to bam file.
0
0
Entering edit mode
4 months ago
usef • 0

samtools view -S -b BD143_TGACCA_L005.sam -o BD143_TGACCA_L005.bam

When I am running this command the following error is appearing:

[main_samview] fail to read the header from "BD143_TGACCA_L005.sam".

As a result, if anyone knows how to fix this error and thanks.

converting File • 672 views
ADD COMMENT
0
Entering edit mode

Which aligner did you use to generate the SAM file? All aligners should write a valid header when the originally create that file.

ADD REPLY
0
Entering edit mode

BWA Aligner.

ADD REPLY
0
Entering edit mode

Well, what does the header look like?

ADD REPLY
0
Entering edit mode

An empty file.

ADD REPLY
0
Entering edit mode

What do you get when you try

head -3 BD143_TGACCA_L005.sam

If you have an empty file they your alignment did not work. You will need to debug your bwa step.

ADD REPLY
0
Entering edit mode

Thanks I have did it and it works.

ADD REPLY
0
Entering edit mode

You might be using the samtools new version which has changed the input parameters. Which samtools version are you using?

ADD REPLY

Login before adding your answer.

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