Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨New Feature: Remove Gene Tracks from Oncoprint #4861

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

SAHU-01
Copy link
Contributor

@SAHU-01 SAHU-01 commented Feb 28, 2024

Fix cBioPortal/cbioportal#10612 (see https://help.github.com/en/articles/closing-issues-using-keywords)

Describe changes proposed in this pull request:

  • Make gene tracks removable by setting removable:true in DeltaUtils.ts
  • Remove gene tracks from track menu in oncoprint UI, by updating URL gene_list

Checks

  • Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
  • The commit log is comprehensible. It follows 7 rules of great commit messages. For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid merge commits, use rebase instead.
  • Is this PR adding logic based on one or more clinical attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in File-Formats Clinical data section!

Any screenshots or GIFs?

If this is a new visual feature please add a before/after screenshot or gif
here with e.g. Giphy CAPTURE or Peek
Before:
image

After:
image

Notify reviewers

@inodb @alisman
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

Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit 1aae7cd
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/6606dcfac93a1e00084ee40b
😎 Deploy Preview https://deploy-preview-4861--cbioportalfrontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

@SAHU-01 Thanks again for working on this!

  • There's a small bug when removing the last gene. Gives an error page. Not sure what the behavior should be. Maybe the remove track button should be disabled when there's only one gene?

@SAHU-01
Copy link
Contributor Author

SAHU-01 commented Mar 8, 2024

@inodb thank you for pointing out the bug, I had missed this edge case, as per your suggestion now, if there is more than 1 gene track present we can delete the tracks, else the "Remove Track" option is disabled when only 1 gene track is present.

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

@SAHU-01 Thanks so much for fixing this so quickly!

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

@SAHU-01 sorry @alisman found some more bugs:

  • When using the merged track feature, see e.g. this query. All the genes become unmerged when one gene is removed. The expected behavior would be that 1) when removing the merged track, the entire merged track is removed and 2) when removing the one gene, the existing merged track stays
  • Other OQL modifiers also get removed when removing a track, see e.g. this query
  • Same issue for DATATYPES, see this query

The documentation for OQL can be found at https://cbioportal.org/oql if helpful

Thanks in advance for looking at it!

@SAHU-01
Copy link
Contributor Author

SAHU-01 commented Mar 11, 2024

@inodb and @alisman regarding the bug in merged track feature, I've fixed it in the above commit and regarding OQL modifiers and DATATYPES issue, though I've found the cause yet I need some time to explore the best possible fix for it, regardless I'll fix it by tomorrow!

@SAHU-01
Copy link
Contributor Author

SAHU-01 commented Mar 12, 2024

@inodb and @alisman I've fixed all the above-listed bugs, do let me know if there are any more bugs or if the code/logic needs more optimization!

@alisman
Copy link
Collaborator

alisman commented Mar 19, 2024

@SAHU-01 for OQL modifiers, I still see the problem IF i remove the first track (BRAF) though it works for subsequent tracks

@SAHU-01
Copy link
Contributor Author

SAHU-01 commented Mar 20, 2024

@SAHU-01 for OQL modifiers, I still see the problem IF i remove the first track (BRAF) though it works for subsequent tracks

@alisman on removing (BRAF), though the modifier (MUT AMP HOMDEL) of the other 2 tracks are not visible, but they still work perfectly, the thing is, when any track is removed it's modifiers are also removed from URL but in this case, in the URL the default modifier (MUT AMP HOMDEL) are not present so after (BRAF) is removed, even though the default modifier(MUT AMP HOMDEL) works as usual they are not visible in UI after deletion.

You can see it in this console where on deleting each track the sublabel shared details about the OQL modifier present
image

When you try removing one of the other 2 tracks first, it's works perfectly because then each track and that track's sublabel is independently pushed to URL like below, I thought specifically pushing sublabels with remaining tracks, when only default tracks remain won't be wise, but if you suggest to push sublabels in case of defaults then I can modify accordingly.
image

@alisman
Copy link
Collaborator

alisman commented Mar 20, 2024

@SAHU-01 thanks for your careful analysis here. I am going to need to think about the right thing to do and discuss with product team. These are probably edge cases we're worried about so maybe it's ok not worry about them. Stay tuned.

@inodb inodb added the gsoc label Mar 27, 2024
@alisman alisman merged commit 50cf526 into cBioPortal:master Mar 29, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants