do we need to sort bam everytime we split it...or are we doing it to be on the safe side? Thanks for your response.
• 0 views
•
link
Depending on your chromosomes, something like:
for chrom in `seq 1 22` X Y
do
samtools view -bh $BAM chr${chrom} | samtools sort - chr${chrom}
samtools index chr${chrom}.bam
done
You can use this tool to do exactly that.
Log in to answer this question.