samtools flagstat Aligned.out.sorted.bam > flagstat.txt