I aligned my ONT sequencing run with minimap2, subsequently I filtered the file using samtools view -b -F 256 aln_transcriptome_sorted_6.bam -o filtered_aln_transcriptome_6.bam
to end up with primary alignments only. When I run samtools flagstat
on the filtered file I get the following output:
3502608 + 0 in total (QC-passed reads + QC-failed reads)
3186175 + 0 primary
0 + 0 secondary
316433 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
3502608 + 0 mapped (100.00% : N/A)
3186175 + 0 primary mapped (100.00% : N/A)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (N/A : N/A)
0 + 0 with itself and mate mapped
0 + 0 singletons (N/A : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
What is the difference between mapped and primary mapped statistics? And why do I still seem to have non primary alignments in my file after filtering?