Entering edit mode
9 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"
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.
Also, there is no need to (normally) ever produce a sam file. Pipe directly into samtools to create a bam file.
samtools view -Sb AD002.sam > AD002.bam .. You can use this to convert sam to bam then try viewing your file.