Skip to content

This commit allows mito genes (currently ensembl only) to validate as tx - #883

Open
Peter-J-Freeman wants to merge 2 commits into
regex_removalfrom
mito_gene
Open

Peter-J-Freeman wants to merge 2 commits into
regex_removalfrom
mito_gene

Conversation

@Peter-J-Freeman

Copy link
Copy Markdown
Collaborator

The relevant transcript mappings have been fixed and the code updated top allow mito genes to produce c. and m. from genomic m.

The relevant transcript mappings have been fixed and the code updated
top allow mito genes to produce c. and m. from genomic m.
@codecov

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.97%. Comparing base (e53f061) to head (380ff56).
⚠️ Report is 5 commits behind head on regex_removal.

Additional details and impacted files
@@                Coverage Diff                @@
##           regex_removal     #883      +/-   ##
=================================================
+ Coverage          84.91%   84.97%   +0.06%     
=================================================
  Files                 48       48              
  Lines              14589    14614      +25     
=================================================
+ Hits               12388    12418      +30     
+ Misses              2201     2196       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The mito translation table is non-standard. The code pushed has tests
based on the accidentally malformed VVTA before we spotted it, so it has
 broken tests.
@Peter-J-Freeman

Copy link
Copy Markdown
Collaborator Author

Note on merge.

This branch has code we need, but the tests are, I have just discovered, based on the broken VVTA database. It may be best not to merge this, but to work in the code changes or tests may get overwritten.

Tests can be based on

import json
import VariantValidator
vval = VariantValidator.Validator()
variant = "NC_012920.1(MT-ND4):m.11232T>C"
genome_build = 'GRCh38'
select_transcripts = 'all'
transcript_set = 'ensembl'
validate = vval.validate(variant, genome_build, select_transcripts, transcript_set)
validation = validate.format_as_dict(with_meta=True)
print(json.dumps(validation, sort_keys=True, indent=4, separators=(',', ': ')))
{
    "ENST00000361381.2:c.473T>C": {
        "alt_genomic_loci": [],
        "annotations": {
            "chromosome": "MT",
            "db_xref": {
                "CCDS": null,
                "ensemblgene": "ENSG00000198886",
                "hgnc": "HGNC:7459",
                "ncbigene": null,
                "select": "Ensembl"
            },
            "ensembl_select": true,
            "mane_plus_clinical": false,
            "mane_select": false,
            "map": "mitochondria",
            "note": "mitochondrially encoded NADH:ubiquinone oxidoreductase core subunit 4",
            "refseq_select": false,
            "variant": "201"
        },
        "gene_ids": {
            "ccds_ids": [],
            "ensembl_gene_id": "ENSG00000198886",
            "entrez_gene_id": "4538",
            "hgnc_id": "HGNC:7459",
            "omim_id": [
                "516003"
            ],
            "ucsc_id": "uc064xpj.1"
        },
        "gene_symbol": "MT-ND4",
        "genome_context_intronic_sequence": "",
        "hgvs_lrg_transcript_variant": "",
        "hgvs_lrg_variant": "",
        "hgvs_predicted_protein_consequence": {
            "lrg_slr": "",
            "lrg_tlr": "",
            "slr": "ENSP00000354961.2:p.(L158P)",
            "tlr": "ENSP00000354961.2:p.(Leu158Pro)"
        },
        "hgvs_refseqgene_variant": "",
        "hgvs_transcript_variant": "ENST00000361381.2:c.473T>C",
        "lovd_corrections": null,
        "lovd_messages": null,
        "primary_assembly_loci": {
            "grch37": {
                "hgvs_genomic_description": "NC_012920.1:m.11232T>C",
                "vcf": {
                    "alt": "C",
                    "chr": "M",
                    "pos": "11232",
                    "ref": "T"
                }
            },
            "grch38": {
                "hgvs_genomic_description": "NC_012920.1:m.11232T>C",
                "vcf": {
                    "alt": "C",
                    "chr": "M",
                    "pos": "11232",
                    "ref": "T"
                }
            },
            "hg38": {
                "hgvs_genomic_description": "NC_012920.1:m.11232T>C",
                "vcf": {
                    "alt": "C",
                    "chr": "chrM",
                    "pos": "11232",
                    "ref": "T"
                }
            }
        },
        "reference_sequence_records": {
            "protein": "https://www.ensembl.org/Homo_sapiens/Transcript/ProteinSummary?db=core;p=ENSP00000354961.2",
            "transcript": "https://www.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;t=ENST00000361381.2"
        },
        "refseqgene_context_intronic_sequence": "",
        "rna_variant_descriptions": null,
        "selected_assembly": "GRCh38",
        "submitted_variant": "NC_012920.1(MT-ND4):m.11232T>C",
        "transcript_description": "ND4-201",
        "validation_warnings": [
            "VariantSyntaxError: Removing redundant gene symbol none from variant description"
        ],
        "variant_exonic_positions": {}
    },
    "flag": "gene_variant",
    "metadata": {
        "variantvalidator_hgvs_version": "4.0.0",
        "variantvalidator_version": "4.0.1.dev100+g0f5e4f065.d20260730",
        "vvdb_version": "vvdb_2026_7",
        "vvseqrepo_db": "VV_SR_2026_07/master",
        "vvta_version": "vvta_2026_07"
    }
}

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant