Entering edit mode
13 months ago
rj.rezwan
▴
10
Hi, I am using the merge function of samtools
to merge all the available bam files produced after HISAT alignment
. Every file has >85%
alignment with the reference genome. Please guide me how to fix this truncated file issue.
code for samtools merge
module load samtools/1.16.1
samtools merge -@ 30 updated_all_merged.bam DRR128251.bam DRR128253.bam DRR128254.bam SRR13775188.bam SRR13775193.bam SRR13775195.bam SRR13775200.bam SRR13775202.bam SRR13775203.bam SRR15216397.bam SRR15216398.bam SRR15216399.bam SRR15216400.bam SRR15216401.bam SRR15216403.bam SRR15216404.bam SRR15216405.bam SRR19863825.bam SRR19863829.bam SRR2924904.bam SRR3203780.bam SRR8327215.bam
error description
Samtools 1.6 is now loaded
[E::bgzf_uncompress] Inflate operation failed: invalid code lengths set
[E::bgzf_read] Read block operation failed with error 1 after 0 of 4 bytes
samtools merge: "SRR13775195.bam" is truncated
i just used this
quickcheck
and it passed successfully. Later I viewed the file and found thatEOF marker is absent
. So how do we solve this error of truncation? I have also shared a head of the file view hereYou have to repeat alignment for this one. No way to fix it other than producing the bam properly from scratch.