Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import fails with error 'intron_variant' #2203

Open
stolpeo opened this issue Jan 23, 2025 · 1 comment
Open

import fails with error 'intron_variant' #2203

stolpeo opened this issue Jan 23, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@stolpeo
Copy link
Contributor

stolpeo commented Jan 23, 2025

Describe the bug
Some case imports fail with the error message intron_variant in the post import step when computing the variant stats after the seqvar import.

@stolpeo stolpeo added the bug Something isn't working label Jan 23, 2025
@stolpeo stolpeo self-assigned this Jan 23, 2025
@stolpeo
Copy link
Contributor Author

stolpeo commented Jan 23, 2025

RCA

>>> gather_variant_stats(s)
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.10.15/lib/python3.10/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/usr/src/app/variants/variant_stats.py", line 79, in gather_variant_stats
    effect_counts[sample][effect] += small_var.genotype[sample]["gt"].count("1")
KeyError: 'intron_variant'

This is the elaborated error message. The effect intron_variant is known by the sequence ontology and partly by varfish, however the stat computation does not know this variant (yet)

From variant/forms.py:

FILTER_FORM_TRANSLATE_EFFECTS = {
    "effect_coding_transcript_intron_variant": "coding_transcript_intron_variant",
    "effect_complex_substitution": "complex_substitution",
    "effect_direct_tandem_duplication": "direct_tandem_duplication",
    "effect_disruptive_inframe_deletion": "disruptive_inframe_deletion",
    "effect_disruptive_inframe_insertion": "disruptive_inframe_insertion",
    "effect_downstream_gene_variant": "downstream_gene_variant",
    "effect_exon_loss_variant": "exon_loss_variant",
    "effect_feature_truncation": "feature_truncation",
    "effect_5_prime_UTR_exon_variant": "5_prime_UTR_exon_variant",
    "effect_5_prime_UTR_intron_variant": "5_prime_UTR_intron_variant",
    "effect_frameshift_elongation": "frameshift_elongation",
    "effect_frameshift_truncation": "frameshift_truncation",
    "effect_frameshift_variant": "frameshift_variant",
    "effect_inframe_deletion": "inframe_deletion",
    "effect_inframe_insertion": "inframe_insertion",
    "effect_intergenic_variant": "intergenic_variant",
    "effect_internal_feature_elongation": "internal_feature_elongation",
    "effect_missense_variant": "missense_variant",
    "effect_mnv": "mnv",
    "effect_non_coding_transcript_exon_variant": "non_coding_transcript_exon_variant",
    "effect_non_coding_transcript_intron_variant": "non_coding_transcript_intron_variant",
    "effect_splice_acceptor_variant": "splice_acceptor_variant",
    "effect_splice_donor_variant": "splice_donor_variant",
    "effect_splice_region_variant": "splice_region_variant",
    "effect_start_lost": "start_lost",
    "effect_stop_gained": "stop_gained",
    "effect_stop_lost": "stop_lost",
    "effect_stop_retained_variant": "stop_retained_variant",
    "effect_structural_variant": "structural_variant",
    "effect_synonymous_variant": "synonymous_variant",
    "effect_3_prime_UTR_exon_variant": "3_prime_UTR_exon_variant",
    "effect_3_prime_UTR_intron_variant": "3_prime_UTR_intron_variant",
    "effect_transcript_ablation": "transcript_ablation",
    "effect_upstream_gene_variant": "upstream_gene_variant",
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant