Open eboyden opened 1 year ago
Reviewing this a few months later, I noticed that although the alignment rate with -s 50 500
is high (98.35%), the "properly paired" rate is low (only 58.35%), which suggests that nearly half of the alignments have short intervals. So adding -fs
to the command is simply preventing those "improperly paired" alignments from occurring. So the problem seems to be with the minimum insert size, not the -fs
option.
I wonder if SNAP computes the interval differently than the other aligners. I'll take a look at it and see what's up.
Yeah I think you're right - I just took another look at alignments with either -s 0 500 -fs
or -s 50 500 -fs
, and in the latter case not only did the number of alignments with intervals >=50 sharply decrease, I also still observed plenty of alignments with intervals <50. Note that I'm basing interval size on column 9 of the sam file (TLEN).
I'll figure it out and try to harmonize what we're doing with the other aligners.
When I aligned a pair of fastqs using BWA-MEM2, Bowtie2, or SNAP, and an enforced interval size of 0-500, I got similar results. When I aligned with BWA-MEM2 or Bowtie2 and an enforced interval size of 50-500, the results didn't change much; very few on-target alignments had intervals <50 bp. But when I aligned with SNAP and an enforced (using
-fs
) interval size of 50-500, many fewer reads aligned. Furthermore, here is an example of a read pair that no longer aligned with a minimum interval of 50 bp, despite the fact that it's a 120 bp properly paired interval:I also recapitulated this on the NA12878 data NIST7035_TAAGGCGA; the alignment rate fell from 97% to 59%. And it only seems to happen with the
-fs
option.samtools flagstat reports:
-s 0 500
:-s 0 500 -fs
(similar results):-s 50 500
(similar results):-s 50 500 -fs
(abnormally low alignment rate):For comparison: Bowtie2
--very-fast-local -I 0 --no-discordant
(default):Bowtie2
--very-fast-local -I 50 --no-discordant
: