I have few bam files and would like to get read counts using
[Data is aligned to hg19 transcriptome]. To use that command I need a sorted bam file. So to sort them I gave the following command.
samtools sort -T /tmp/input.sorted -o input.sorted.bam input.bam
This ended up showing:
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated. [E::bgzf_read] bgzf_read_block error -1 after 0 of 4 bytes [bam_sort_core] truncated file. Aborting.
And the tmp dir has 6 input.sorted.nnnn.bam files.