You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] CIViC annotations never show for amplifications and deep deletions in the patient view CNA table #12533
Describe the bug
In the patient view copy-number table, the CIViC icon never shows variant-level evidence for amplifications or deep deletions, even for well-curated ones like ERBB2 Amplification. Only the gene summary appears.
The CNA path compares CIViC variant names to upper-case constants:
The current CIViC GraphQL API returns these variants in title case. For example, genes(entrezSymbols: ["ERBB2","EGFR","MET","MYC","CDKN2A","PTEN"]) returns Amplification for ERBB2, EGFR, MET and MYC, and Deletion (plus Loss) for CDKN2A and PTEN. Nothing equals AMPLIFICATION or DELETION, so the CNA variant map is always empty. The test mocks in src/test/CivicMockUtils.ts still use the upper-case names (I think from the CIViC v1 API), which is why the unit tests pass.
To Reproduce
On cbioportal.org (show_civic is on), open the patient view of any patient with an ERBB2 amplification, e.g. in TCGA Breast PanCancer Atlas.
In the Copy Number Alterations table, look at the CIViC icon in the Annotation column for ERBB2.
It shows no CIViC variant evidence for the amplification.
Expected behavior
Amplifications match CIViC's Amplification variant and deep deletions match Deletion, so the CIViC tooltip shows their evidence, as it does for mutations.
Suggested fix
Compare case-insensitively in both places and update the mocks to the current names, with a spec for the title-case names. Open question for you: should a deep deletion also match CIViC's Loss variant?
The open WSI viewer PR (cbioportal-frontend#5823) reuses getCivicVariants() for CNAs, so it would inherit this.
I'm happy to open a PR for this if it sounds right.
Hi! I'd be interested in working on this issue as my first contribution to cBioPortal. I understand the issue is caused by case-sensitive comparisons of CIViC alteration names, and I'd like to investigate the fix and add tests for the updated API response names.
Would you be okay with me taking this up, or are you already planning to work on it?
Hi @Poojitha-Goranta, thanks for offering! Sure, go ahead and take it. I haven't started a branch.
A few pointers from when I dug into it:
There are two places to fix: getCivicVariants() in packages/cbioportal-utils/src/civic/CivicUtils.ts and getCivicCNAVariants() in src/shared/lib/CivicUtils.ts.
The mocks in src/test/CivicMockUtils.ts use the old upper-case names, so a spec with Amplification / Deletion is what would have caught this.
The Loss question from the issue is still open for the maintainers; it might be worth keeping it out of the first PR.
Feel free to tag me on the PR and I'll take a look.
Activity
Poojitha-Goranta commentedon Nov 27, 2026
Hi! I'd be interested in working on this issue as my first contribution to cBioPortal. I understand the issue is caused by case-sensitive comparisons of CIViC alteration names, and I'd like to investigate the fix and add tests for the updated API response names.
Would you be okay with me taking this up, or are you already planning to work on it?
Thanks!
arieleven commentedon Nov 27, 2026
Hi @Poojitha-Goranta, thanks for offering! Sure, go ahead and take it. I haven't started a branch.
A few pointers from when I dug into it:
There are two places to fix: getCivicVariants() in packages/cbioportal-utils/src/civic/CivicUtils.ts and getCivicCNAVariants() in src/shared/lib/CivicUtils.ts.
The mocks in src/test/CivicMockUtils.ts use the old upper-case names, so a spec with Amplification / Deletion is what would have caught this.
The Loss question from the issue is still open for the maintainers; it might be worth keeping it out of the first PR.
Feel free to tag me on the PR and I'll take a look.