For the same pair of reads, bismark will return the number of mismatch for each read. This is different compared to STAR where the two reads in a pairs have the same number of mismatches.
The code is correctly using the first reads from a pair to get the number of mismathces, this works for STAR but not for bismark.
We cannot use the sum of the mismatches either because sometimes the two reads have overlapped region.
Thus, we decide to use the avgerage number of mismatches as the mismatch for the pair.
For the same pair of reads, bismark will return the number of mismatch for each read. This is different compared to STAR where the two reads in a pairs have the same number of mismatches.
The code is correctly using the first reads from a pair to get the number of mismathces, this works for STAR but not for bismark.
We cannot use the sum of the mismatches either because sometimes the two reads have overlapped region.
Thus, we decide to use the avgerage number of mismatches as the mismatch for the pair.
29d88874a1ddf06356e2b251f84eb05efde742c5