Paired-end bug fix
Changes:
Excluded chromosomes should not influence
on mapped reads number. So when BAM statistics
is calculated the results are the following:
- Total = all reads, includeing excluded chrms
- Excluded = reads from excluded chrms
- Aligned = Total - Excluded - NotAligned
- NotAligned are all the reads which satisfy one
of the criterias:- not mapped (0x4)
- not primary alignment (0x100)
- PCR or optical duplicate (0x400)
- is paired (0x1), but is not proper pair (0x2)
- is paired (0x1), but mate is unmapped (0x8)
We don't need to check if paired-end reads have
correct alignment or if they are on opposite strands
etc, because proper pair (0x2) flag set by aligner
is enough to make the conclusion that everything
ok with that read (tested with STAR).
Refactore:
- excluded chromosomes are completely skipped at the
beginning of the program. We don't load them at all