Entering edit mode
10 months ago
marco.barr
▴
160
I'm trying to extract the reads relating to chrM from an aligned BAM file but without success. These are my commands:
samtools view -h Linfo_mt6394_aligned_sorted.bam chrM > Linfo_mt6394_chrM_aligned.sorted.sam
samtools view -bS Linfo_mt6394_chrM_aligned.sorted.sam > Linfo_mt6394_chrM_aligned.sorted.bam
when I check with samtools idxstats results all chromosome. Why? Are there alternative ways to extract single chromosome reads from a BAM file?
Thanks