samtools bam2counts

PHOTO EMBED

Sun Mar 28 2021 12:49:54 GMT+0000 (Coordinated Universal Time)

Saved by @rezaeir #bash #samtools #bam #count

for file in *
do
file=${file//.bam/}
samtools sort -@ 14 $file.bam > $file.sorted.bam
samtools index -@ 14 -b $file.sorted.bam
samtools idxstats -@ 14 $file.sorted.bam > $file.idxstats.txt
done
content_copyCOPY

how to get the genome/chromosome level count data from bam file

https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746