Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Mask not computed correctly. Possible off-by-1 error? #152

Open

Description

@bw2

broadinstitute/SpliceAI-lookup#59
has several examples of apparently inconsistent masking. For example, for
1-237727120-T-C
the mask only affects the Acceptor Gain score, but should arguably be applied to both the Acceptor Gain and Donor Gain:

image image

Am I not interpreting the results correctly?

Activity

  1. kishorejaganathan commented on Nov 21, 2024

    @kishorejaganathan
    Collaborator

    This is unfortunately caused because of the fact that the mask implementation is a super-hacky one and not precise. We only look for the closest exon boundary

    dist_ann = (dist_tx_start, dist_tx_end, dist_exon_bdry)
    and check whether that position is reported in the output

    SpliceAI/spliceai/utils.py

    Lines 185 to 188 in f364513

    mask_pa = np.logical_and((idx_pa-cov//2 == dist_ann[2]), mask)
    mask_na = np.logical_and((idx_na-cov//2 != dist_ann[2]), mask)
    mask_pd = np.logical_and((idx_pd-cov//2 == dist_ann[2]), mask)
    mask_nd = np.logical_and((idx_nd-cov//2 != dist_ann[2]), mask)
    This worked most of the time when the distance parameter is less (like the default 50) as you are unlikely to see two ends of an exon within such a short distance, but completely falls apart when the distances are large. I would recommend ignoring the mask property for larger distances for the time-being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions