mapped reads and unmapped reads not equal total number of reads
To remove mitochondria , align with mitochondria reference and reads. After that I collect mapped reads and unmapped reads. But mapped reads + unmapped != total number of reads, Why?
• 2,779 views
•
link
1 answer
They can not always be equal. Why do you think so ? One probable reason is that count of mapped reads includes multi-mapped reads too. A read mapping , say twice (at 2 different loci) , will be counted twice !
• 0 views
•
link
Log in to answer this question.
Could you please share the commands used to calculate mapped & unmapped. And also the aligner used with parameters given.
Align:
bwa mem -t 8 -R '@RG\tID:1\tLB:1\tPL:ILLUMINA\tSM:1' mt.fasta read1.fq read2.fq >aln-mt.samUnmapped read:
samtools view -@ 12 -b -S -f 12 aln-mt.sam > unmapped.bamMapped read:
samtools view -@ 12 -b -S -F 12 aln-mt.sam > mapped.bamCould you please check if counting by reads rather than by pairs is working fine. i.e. Please use flag -F 260 instead of 12 to get mapped count.Also -f 4 instead of 12 to get unmapped. Please add the above two and see if it totals correctly with input count. example