Trying to use GATK which requires sorted bam file(according to coordinate), and also need a 'SO:coordinate' flag appearing in the head.
I check the header of my sorted bam files, however there's no such flag. Why?
btw, I read some posts about the confusion of the header of sorted bam, and how to check if the file is sorted or not. People have lots of discussion.
But to me, I just check the very first couple of lines of bam files using /samtools view in.bam|head -10
; if the coordinate is sorted, I'll think well it's good in shape. Isn't it that easy as I suggested?
Have you sorted the file? If so, how?
Sorry for my late. I just use samtools sort .bam