sequence and quality are inconsistent
0
0
Entering edit mode
6.1 years ago

Hi,

while converting the sam to bam file using samtools i get the following error: [samopen] SAM header is present: 279439 sequences. Parse error at line 31099973: sequence and quality are inconsistent

Below are the commands that i have used for alignment and sam to bam conversion:

bowtie2 -x reference_genome/indexed -1 sample_R1.fastq.gz -2 sample_R2_.fastq.gz -S aligned_PE.sam

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

Could anyone give your suggestion to solve this..

Thanks in advance!!

alignment • 2.7k views
ADD COMMENT
1
Entering edit mode

Have you tried looking at the mentioned line (=- few lines) in your original file?. it might be there is a length difference between the two or some 'illegal/hidden' chars have been added?

ADD REPLY
0
Entering edit mode

I have checked that line and there is length difference between the two..

ADD REPLY
1
Entering edit mode
  1. You are using a prehistoric version of samtools. 2. Did you consider looking at line 31099973?
ADD REPLY
0
Entering edit mode

I am using samtools 1.3. i looked the line, the difference is there.

ADD REPLY
0
Entering edit mode

Are you working with the original files or have they been quality trimmed/filtered and/or merged or something like that?

ADD REPLY
0
Entering edit mode

i am working with quality trimmed files.

ADD REPLY
0
Entering edit mode

Then there is a fair chance that something went wrong in the mapping step.

Try to re-run the mapping step (perhaps in verbose mode, so you might spot issues if there are any)

ADD REPLY
0
Entering edit mode

Hi. I have already started re-running alignment step. Thanks!

ADD REPLY
0
Entering edit mode

You may have installed samtools 1.3 (which is also somewhat out of date at this point), but if it is printing out "[samopen] SAM header is present" then you are actually using samtools 0.1.18 or thereabouts. Check your $PATH, because you're not using the version of samtools that you think you are.

ADD REPLY
0
Entering edit mode

May be I shall install the latest samtools

ADD REPLY

Login before adding your answer.

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