samtools view: error reading file
0
0
Entering edit mode
8 months ago
ray • 0

I am currently facing an error while attempting to convert a SAM file to a BAM file, and I am seeking assistance to resolve this issue.

samtools view -b -o AD002.bam AD002.sam                                                                                                       
[W::sam_read1_sam] Parse error at line 7312771                                           
samtools view: error reading file "AD002.sam"
samtools bowtie2 • 953 views
ADD COMMENT
3
Entering edit mode

Most likely the input file is corrupt or truncated. Take a look at line 7312771, also check that your disk isn't full (which is one of the most common accidents with large data processing) and check the log of the process creating the sam file.

ADD REPLY
2
Entering edit mode

Also, there is no need to (normally) ever produce a sam file. Pipe directly into samtools to create a bam file.

aligner (...options) | samtools view -o out.bam
ADD REPLY
0
Entering edit mode

samtools view -Sb AD002.sam > AD002.bam .. You can use this to convert sam to bam then try viewing your file.

ADD REPLY

Login before adding your answer.

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