Entering edit mode
6.5 years ago
sambioinfo2018
▴
20
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!!
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?
I have checked that line and there is length difference between the two..
I am using samtools 1.3. i looked the line, the difference is there.
Are you working with the original files or have they been quality trimmed/filtered and/or merged or something like that?
i am working with quality trimmed files.
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)
Hi. I have already started re-running alignment step. Thanks!
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.
May be I shall install the latest samtools