Entering edit mode
3 months ago
Tommy
•
0
for example, I have a raw sequence .fastq that is trimmed, QC-ed and bowtie2 mapped to a reference genome. to count the reads in the .bam file:
samtools view -c abc.bam (Print only the count of matching records)
12414891
samtools view -c -f 4 abc.bam (unmapped reads)
191787
samtools view -c -F 4 abc.bam (mapped reads)
12223104
so the mapped reads + unmapped reads = matching records
what does it mean if a read is matching but not mapped?
Also the total read # is a .bam is clearly less than the total read number of QC-ed fastq, meaning there are a lot more unmapped reads in .fastq. what is the difference between unmapped reads in .bam and unmapped reads in fastq? (if I have a read of (T)150, will this be included by -f 4?)
@Ian Sudbery recently clarified this in: meaning of "primary alignment" in samtools
what do you mean with "matching"
reads in fastq are not mapped. May be you're talking about secondary and supplementary alignments