Skip to content

Validate gene ids based on organism ontology id#6

Merged
rm1113 merged 6 commits into
mainfrom
organism_from_id
Sep 30, 2025
Merged

Validate gene ids based on organism ontology id#6
rm1113 merged 6 commits into
mainfrom
organism_from_id

Conversation

@rm1113
Copy link
Copy Markdown
Contributor

@rm1113 rm1113 commented Sep 30, 2025

No description provided.

@rm1113 rm1113 requested a review from Copilot September 30, 2025 12:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the organism validation system to support ontology ID-based organism identification alongside the existing string-based approach. The changes replace the enum-based EnsemblOrganism with dataclass-based organism classes and add support for organism ontology term IDs.

  • Replaced EnsemblOrganism enum with dataclass-based organism classes (HomoSapiens, MusMusculus, MultiSpecies, UnsupportedOrganism)
  • Added support for organism ontology term ID column (organism_ontology_term_id) in addition to the existing organism name column
  • Updated validation logic to handle both organism name strings and ontology IDs

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

File Description
src/cap_upload_validator/gene_mapping/gene_map.py Replaces enum with dataclass-based organism system and adds conversion functions
src/cap_upload_validator/upload_validator.py Updates validation logic to support both organism names and ontology IDs
src/cap_upload_validator/gene_mapping/init.py Updates exports to include new organism classes and functions
test/test_upload_validator.py Updates tests to use new organism classes and adds ontology ID test case

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/cap_upload_validator/gene_mapping/gene_map.py
Comment thread src/cap_upload_validator/upload_validator.py
Comment thread src/cap_upload_validator/gene_mapping/gene_map.py
Comment thread src/cap_upload_validator/upload_validator.py
@rm1113 rm1113 merged commit b154e91 into main Sep 30, 2025
5 checks passed
@rm1113 rm1113 deleted the organism_from_id branch September 30, 2025 12:30
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