sam file error
1
0
Entering edit mode
3 months ago
Chironex ▴ 40

Hi, I was converting my sam file (after alignment with bowtie2) in bam format. I encountered the error:

[E::sam_parse1] invalid QUAL character
[W::sam_read1_sam] Parse error at line 11129453

command:

samtools view -S -b -o input.bam ../alignment/input.sam 

Alignment works fine. This is the output:

22504890 reads; of these:
  18951369 (84.21%) were paired; of these:
    574151 (3.03%) aligned concordantly 0 times
    13965369 (73.69%) aligned concordantly exactly 1 time
    4411849 (23.28%) aligned concordantly >1 times
  3553521 (15.79%) were unpaired; of these:
    98535 (2.77%) aligned 0 times
    2418010 (68.05%) aligned exactly 1 time
    1036976 (29.18%) aligned >1 times
96.99% overall alignment rate
samtools • 567 views
ADD COMMENT
1
Entering edit mode
3 months ago
ATpoint 82k

The sam file seems corrupt. Repeat the alignment. The suggested command to get bam right away is:

bowtie2 (...) | samtools view -o out.bam
ADD COMMENT
0
Entering edit mode

thank you.. I had to repeat 12 hours of aligment.. again!!

ADD REPLY
0
Entering edit mode

sam files do not randomly get corrupted. find out the cause.

ADD REPLY
0
Entering edit mode

I have no clue, with other fastq files is working fine

ADD REPLY
0
Entering edit mode

I found the problem. After trimmomatic's trimming, I get paired and unpaired fastq files. I feed bowtie2 with both, paired files and unpaired with the option -U. The point Is that unpaired fastq file (file.R2.U.fastq) was very low quality. Removing unpaired files, the sam file was not corrupted and I was able to convert It into bam.

ADD REPLY

Login before adding your answer.

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