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
Attempting to apply pmd-mask on a file containing reads whose CIGAR exceeds the length specified in the LN field of the corresponding @sq header causes a runtime runtime panic.
If POS plus the sum of lengths of M/=/X/D/N operations in CIGAR exceeds the length specified in
the LN field of the @sq header line (if exists) with an SN equal to RNAME, the alignment should
be unmapped, unless the reference sequence is circular (see below)
Minimally reproducible example:
Run pmd-mask on a file containing the following line, with GRCh37 as a reference:
Note that the expected length of chromosome Y on GRCh37 is exactly 59373566.
Output with TRACE log-level is:
[2023-07-19T16:04:52 TRACE pmd_mask] ---- Inspecting record: Y + 59373565
[2023-07-19T16:04:52 TRACE pmd_mask] Relevant thresholds: (5p: 2bp) (3p: 3bp)
[2023-07-19T16:04:52 TRACE pmd_mask] CIGAR : 36M
[2023-07-19T16:04:52 TRACE pmd_mask] Reference: N
[2023-07-19T16:04:52 TRACE pmd_mask] Sequence : GGATCACAGGTCTATCACCCTATTAACCACTCACGG
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 34', /data/mlefeuvre/dev/aDNA-pipeline/workflow/scripts/pmd-mask/src/lib.rs:25:12
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
The text was updated successfully, but these errors were encountered:
Bug description
Attempting to apply
pmd-mask
on a file containing reads whose CIGAR exceeds the length specified in the LN field of the corresponding @sq header causes a runtime runtime panic.Exception first encountered by @J-Sauvage , while applying
pmd-mask
on sampleMX210
( Furtwangler, 2020)A description of these "spurious" BAM records can be found in the SAM format specification -page 10:
Minimally reproducible example:
Run
pmd-mask
on a file containing the following line, withGRCh37
as a reference:Note that the expected length of chromosome Y on
GRCh37
is exactly59373566
.Output with
TRACE
log-level is:The text was updated successfully, but these errors were encountered: