You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//let end = std::cmp::max(r1_pos, r1_pos + insert);
501
501
502
502
// TODO: need to figure out what is correct position, add insert size or use r2_pos??
503
+
// Yes, r1_pos + TLEN should give r2_pos (end - start + ), I think the following issue is a special case:
503
504
// NOTE: Using current implementation, a small number of reads (~10%) have end positions shifted by ~3 bp relative to bedtools bamtobed -bedpe -i - | cut -f1,2,6
504
505
// WHY???
506
+
// I think this maybe is related to some CIGAR thing? But in my tests I can't work out why
507
+
// I am fairly certain I am correct here and that bedtools is maybe off by 1? But my guess is I'm not accounting for something here.
508
+
// bedtools calls bam_cigar_oplen when using bam.GetEndPos, but I can't tell what it's doing. My guess is it's parsing the CIGAR and shifting the coord by any mismatches/etc.
509
+
// Not sure though
510
+
// For future reference:
511
+
// GetEndPosition -> bam_endpos -> bam_cigar_oplen in bedtools
0 commit comments