Ömer An
04/01/2026, 6:56 AMsamtools flagstat for my FASTQ file as below (only R1, same numbers for R2 as well):
27029628 + 0 in total (QC-passed reads + QC-failed reads)
27029628 + 0 primary
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
0 + 0 mapped (0.00% : N/A)
0 + 0 primary mapped (0.00% : N/A)
27029628 + 0 paired in sequencing
27029628 + 0 read1
0 + 0 read2
0 + 0 properly paired (0.00% : N/A)
0 + 0 with itself and mate mapped
0 + 0 singletons (0.00% : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
After processing with oncoanalyser, I have the samtools flagstat for redux BAM files as below:
59520069 + 0 in total (QC-passed reads + QC-failed reads)
59501038 + 0 primary
0 + 0 secondary
19031 + 0 supplementary
11655993 + 0 duplicates
11653556 + 0 primary duplicates
59461559 + 0 mapped (99.90% : N/A)
59442528 + 0 primary mapped (99.90% : N/A)
59501038 + 0 paired in sequencing
29750519 + 0 read1
29750519 + 0 read2
59155516 + 0 properly paired (99.42% : N/A)
59437080 + 0 with itself and mate mapped
5448 + 0 singletons (0.01% : N/A)
247516 + 0 with mate mapped to a different chr
229968 + 0 with mate mapped to a different chr (mapQ>=5)
I am wondering how the number of reads increased after the alignment, i.e. went from 27M to 29.7M.Rayan Hassaïne
04/02/2026, 11:14 AMÖmer An
04/07/2026, 8:56 AMStephen Watts
04/09/2026, 12:31 AMStephen Watts
04/09/2026, 12:31 AMStephen Watts
04/09/2026, 12:32 AM# Input reads
$ samtools flagstat data/sample_data/fastq.modified/subject_a.tumor.dna.modified.R1.fastq.gz | grep -e total -e read1
210146 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 read1
# bwa-mem2 BAM
$ samtools flagstat $(find work/ -type f -name '*tumor*bam' ! -name '*redux*') | grep -e total -e read1
420311 + 0 in total (QC-passed reads + QC-failed reads)
210146 + 0 read1
# REDUX BAM
$ samtools flagstat output/subject_a/alignments/dna/subject_a.tumor.redux.bam | grep -e total -e read1
422353 + 0 in total (QC-passed reads + QC-failed reads)
211167 + 0 read1
# Forward read alignments (excluding secondary, supplementary, and consensus); consensus reads identified by 'CNS_' string
$ samtools view -f READ1 -F SECONDARY,SUPPLEMENTARY output/subject_a/alignments/dna/subject_a.tumor.redux.bam | grep -v CNS | wc -l
210146Ömer An
04/10/2026, 7:07 AMÖmer An
04/12/2026, 1:56 PMStephen Watts
04/13/2026, 1:05 AMStephen Watts
04/13/2026, 1:05 AMStephen Watts
04/13/2026, 1:06 AMÖmer An
04/13/2026, 6:41 AMÖmer An
04/13/2026, 6:43 AM