I'm playing around with quality trimming reads using Trimmomatic and I'm getting some results that I can't explain when mapping these reads. I aligned trimmed reads using the default alignment parameters in bwa. I also aligned the untrimmed reads separately for comparison. The number of reads that are 'properly paired' using the non-trimmed reads is much higher than with the trimmed reads. The numbers from flagstat are below. All the numbers make sense to me (increase in mapping with trimming, fewer singletons with trimming, etc) except why trimming decreases the numbers that are properly paired.
trimmed reads:
109873392 in total
0 QC failure
0 duplicates
64745645 mapped (58.93%)
109873392 paired in sequencing
54936696 read1
54936696 read2
958 properly paired (0.00%)
64745645 with itself and mate mapped
0 singletons (0.00%)
9331 with mate mapped to a different chr
1 with mate mapped to a different chr (mapQ>=5)
untrimmed reads:
128577404 in total
0 QC failure
0 duplicates
56771463 mapped (44.15%)
128577404 paired in sequencing
64288702 read1
64288702 read2
40092110 properly paired (31.18%)
40500339 with itself and mate mapped
16271124 singletons (12.65%)
3979 with mate mapped to a different chr
3063 with mate mapped to a different chr (mapQ>=5)
trimmed reads:
109873392 in total
0 QC failure
0 duplicates
64745645 mapped (58.93%)
109873392 paired in sequencing
54936696 read1
54936696 read2
958 properly paired (0.00%)
64745645 with itself and mate mapped
0 singletons (0.00%)
9331 with mate mapped to a different chr
1 with mate mapped to a different chr (mapQ>=5)
untrimmed reads:
128577404 in total
0 QC failure
0 duplicates
56771463 mapped (44.15%)
128577404 paired in sequencing
64288702 read1
64288702 read2
40092110 properly paired (31.18%)
40500339 with itself and mate mapped
16271124 singletons (12.65%)
3979 with mate mapped to a different chr
3063 with mate mapped to a different chr (mapQ>=5)