Question: sequence and quality are inconsistent
0
gravatar for sambioinfo2018
13 months ago by
sambioinfo20180 wrote:

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 • 641 views
ADD COMMENTlink modified 13 months ago by WouterDeCoster38k • written 13 months ago by sambioinfo20180
1

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 REPLYlink written 13 months ago by lieven.sterck4.5k

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

ADD REPLYlink written 13 months ago by sambioinfo20180
1
  1. You are using a prehistoric version of samtools. 2. Did you consider looking at line 31099973?
ADD REPLYlink written 13 months ago by John Marshall1.5k

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

ADD REPLYlink written 13 months ago by sambioinfo20180

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

ADD REPLYlink written 13 months ago by lieven.sterck4.5k

i am working with quality trimmed files.

ADD REPLYlink written 13 months ago by sambioinfo20180

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 REPLYlink written 13 months ago by lieven.sterck4.5k

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

ADD REPLYlink written 13 months ago by sambioinfo20180

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 REPLYlink written 13 months ago by John Marshall1.5k

May be I shall install the latest samtools

ADD REPLYlink written 13 months ago by sambioinfo20180
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: 1911 users visited in the last hour