Skip to content

Comments

Gene Specific Chart Comparison Page frontend #5378

Open
i-am-leslie wants to merge 1 commit intocBioPortal:masterfrom
i-am-leslie:gene-specific-chart-comparison
Open

Gene Specific Chart Comparison Page frontend #5378
i-am-leslie wants to merge 1 commit intocBioPortal:masterfrom
i-am-leslie:gene-specific-chart-comparison

Conversation

@i-am-leslie
Copy link

@i-am-leslie i-am-leslie commented Feb 5, 2026

Fix cBioPortal/cbioportal#11771

Describe changes proposed in this pull request:
This pull request introduces frontend updates to support accurate comparison for gene-specific mutation charts and enables a comparison button for gene-specific charts

  • The frontend now sends a request to the backend API (/mutation-data-counts/fetch) to retrieve sample IDs for all groups in a mutation-specific chart.
  • The backend endpoint has been extended to return additional data, allowing the frontend to correctly separate samples into their respective groups for comparison.
  • Previously, the comparison button was disabled when only a single group was present in the chart, as comparison is not meaningful in that case, With this change, when a chart contains more than one group, the comparison button is enabled, and sample IDs can be grouped by their associated clinical attributes to support comparison.
  • The comparison button remains disabled when only one group is available, preserving the intended behavior.

Checks

  • A test was written for the utility class functions that group samples into their respective mutation status
  • Yes, the commit log is comprehensive.
  • No, it is not adding logic based on one or more clinical attributes

Any screenshots or GIFs?

Before

compareoff

After

CompareWork

Notify reviewers

Read our Pull request merging
policy
. It can help to figure out who worked on the
file before you. Please use git blame <filename> to determine that
and notify them either through slack or by assigning them as a reviewer on the PR

clinicalAttributeValues: ClinicalDataCountSummary[],
statusCallback: (phase: LoadingPhase) => void
): Promise<string> {
statusCallback(LoadingPhase.DOWNLOADING_GROUPS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

@i-am-leslie this stretch of code is pretty hairy. see if you can use some of the lodash helpers groupBy, keyBy etc. to simplify this. in particular look for ways to use assignment instead of declaration and addition. i.e. var result = _.groupBy(...)

Copy link
Collaborator

Choose a reason for hiding this comment

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

there are sometimes edge cases where it won't work, but should look. and i must say, that this is where AI really shines. just ask it for suggestsions about how to simplify long stretches of code. it will also add nice comments that help a reader.

@i-am-leslie i-am-leslie force-pushed the gene-specific-chart-comparison branch from 2687b26 to 9274874 Compare February 8, 2026 17:18
@i-am-leslie i-am-leslie marked this pull request as ready for review February 8, 2026 17:28
@i-am-leslie i-am-leslie force-pushed the gene-specific-chart-comparison branch from 4228039 to 0473eb4 Compare February 8, 2026 18:13
Optimization to how groupsamples are created; by using the sample unique id we can create sampleidentifier
@i-am-leslie i-am-leslie force-pushed the gene-specific-chart-comparison branch from d607f22 to 8118bc3 Compare February 22, 2026 14:13
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.

gene specific charts do not have a 'compare groups' option

2 participants