Skip to content

feat(uniprot): support Ensembl protein accessions in UniProt ID mapping#785

Open
davereinhart wants to merge 1 commit into
release-2026.2.7from
davereinhart/ensembl-id-format-updates
Open

feat(uniprot): support Ensembl protein accessions in UniProt ID mapping#785
davereinhart wants to merge 1 commit into
release-2026.2.7from
davereinhart/ensembl-id-format-updates

Conversation

@davereinhart

Copy link
Copy Markdown
Collaborator

infer_db_name_from_sequence_accession now recognizes ENSP accessions and maps them to the Ensembl_Protein source, so accession-based target genes with Ensembl protein IDs resolve to a UniProt ID instead of raising NotImplementedError.

Also make validate_ensembl_identifier accept versioned Ensembl stable IDs (e.g. ENSP00000369497.3) by stripping the trailing . before the idutils.is_ensembl check, matching how validate_refseq_identifier already handles versioned RefSeq accessions.

Related to VariantEffect/dcd_mapping2#110

infer_db_name_from_sequence_accession now recognizes ENSP accessions and
maps them to the Ensembl_Protein source, so accession-based target genes
with Ensembl protein IDs resolve to a UniProt ID instead of raising
NotImplementedError.

Also make validate_ensembl_identifier accept versioned Ensembl stable IDs
(e.g. ENSP00000369497.3) by stripping the trailing .<version> before the
idutils.is_ensembl check, matching how validate_refseq_identifier already
handles versioned RefSeq accessions.

Related to VariantEffect/dcd_mapping2#110
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28893665489

Coverage decreased (-0.2%) to 88.964%

Details

  • Coverage decreased (-0.2%) from the base build.
  • Patch coverage: 8 of 8 lines across 2 files are fully covered (100%).
  • 25 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

25 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
src/mavedb/lib/utils.py 11 28.13%
src/mavedb/lib/clinvar/utils.py 6 90.59%
src/mavedb/worker/jobs/external_services/clinvar.py 5 94.95%
src/mavedb/lib/vep.py 3 87.76%

Coverage Stats

Coverage Status
Relevant Lines: 14290
Covered Lines: 12713
Line Coverage: 88.96%
Coverage Strength: 0.89 hits per line

💛 - Coveralls

If the identifier is not a valid Ensembl identifier.
"""
if not idutils.is_ensembl(identifier):
base_identifier = re.sub(r"\.\d+$", "", identifier)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this line after updating idutils if/when this change gets incorporated:
inveniosoftware/idutils#149

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.

2 participants