Skip to content

feat: extend OncoTree metadata in database and models (#11993)#11997

Open
Annu881 wants to merge 2 commits intocBioPortal:masterfrom
Annu881:feat/oncotree-info-extension-11993
Open

feat: extend OncoTree metadata in database and models (#11993)#11997
Annu881 wants to merge 2 commits intocBioPortal:masterfrom
Annu881:feat/oncotree-info-extension-11993

Conversation

@Annu881
Copy link

@Annu881 Annu881 commented Feb 27, 2026

Fix #11993

Describe changes proposed in this pull request:
This PR extends the OncoTree metadata support in thetype_of_cancertable by adding additional fields to store versioning and status information. This enables better handling of deprecated or historical OncoTree codes.
Changes include:

  1. Extended the type_of_cancer table to include the following columns:
  • VERSION
  • STATUS
  • HISTORY
  • URI
    Implemented for both MySQL and ClickHouse schemas.
  1. Updated Java model classes to support the new metadata fields:
  • TypeOfCancer (legacy domain model)
  • CancerType (application model)
  1. Modified MyBatis mappers to populate the new fields:
  • StudyMapper.xml
  • CancerStudyMapper.xml
  • CancerStudyMetadataMapper.xml
  • ClickhouseCancerStudyMapper.xml
  1. Added a MySQL migration script:

     db-scripts/migration.sql (v2.15.0)
    
  2. Updated test seed data with sample OncoTree metadata:

  • seed_mini.sql
  • clickhouse_data_legacy.sql

This allows storing structured OncoTree metadata such as version history and status information, which can help support deprecated OncoTree codes and improve data traceability.

Checks

  • The commit log is comprehensible. It follows 7 rules of great commit messages. We can fix this during merge by using a squash+merge if necessary
  • Has tests or has a separate issue that describes the types of test that should be created.
    Verified with:
  • CancerTypeMyBatisRepositoryTest
  • CancerTypeServiceImplTest
  • CancerStudyMetadataExporterTests
    Tested using Java 21
  • Is this PR adding logic based on one or more clinical attributes?
    Yes — OncoTree metadata fields (VERSION, STATUS, HISTORY, URI) are clinical classification metadata.
  • Make sure your PR has one of the labels defined in https://github.com/cBioPortal/cbioportal/blob/master/.github/release-drafter.yml
    Recommended label: feature

Any screenshots or GIFs?

N/A (Backend change)

Notify reviewers

@inodb @sheridancbio @YashhCanCode

@sonarqubecloud
Copy link

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.

database should store more oncotree info

1 participant