Hi,
I am working with BAM files and I need to sort them.
I've realized that sorting by chromosome produces a file that's around the same size as the original BAM file but then I cannot index it. When I sort it by read name, I can index it, but the resulting BAM is usually significantly larger than the original, sometimes as much as three times larger. Can't I sort by chromosome and have it be indexable?
Is this normal behaviour or can someone explain what's going on here? I've only found one other thread discussing this but all I understood is that you must sort by read name.
Thank you in advance.
EDIT: I forgot to mention that I am using samtools 0.1.17 on Linux if it matters.
I am working with BAM files and I need to sort them.
I've realized that sorting by chromosome produces a file that's around the same size as the original BAM file but then I cannot index it. When I sort it by read name, I can index it, but the resulting BAM is usually significantly larger than the original, sometimes as much as three times larger. Can't I sort by chromosome and have it be indexable?
Is this normal behaviour or can someone explain what's going on here? I've only found one other thread discussing this but all I understood is that you must sort by read name.
Thank you in advance.
EDIT: I forgot to mention that I am using samtools 0.1.17 on Linux if it matters.
Comment