-
Notifications
You must be signed in to change notification settings - Fork 308
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
Display germline mutation as white stripe in oncoprint view #913
Conversation
perhaps remove all white-space changes in |
@rnugraha Can we still color based on mutation types (missense, truncating, inframe) for germline mutations? |
Hey thanks for submitting @rnugraha ! I don't think the white line can convey all the information. For instance: I can't see the difference between truncating germline mutation and a patient that has both a somatic truncating mutation and a germline mutatation. I think it would make more sense to make a different track for germline mutations. So in the example four tracks, two for somatic BRCA1/2 and two for germline BRCA 1/2 mutation (if there are any). That would also be useful in showing which patients had germline+somatic profiling. Thoughts @adamabeshouse @schultzn ? |
just from a design perspective also, I find white is a little confusing because the other time we use white in the oncoprint is when whitespace means not sequenced, so it seems like it indicates the mutation is not as valid or important somehow (also because it makes the color of the mutation behind it quite difficult to spot) |
cc'ing @schultzn on this discussion. |
@inodb Currently, we have one gene per track and using the OQL it can be split up into multiple. We now also hide mutations in the oncoprint if there is a mutation that 'trumps' it. I think it would be good to keep it consistent. Your suggestion is good, but would be for a different feature in my opinion: 'germline in OQL'. |
@jjgao the mutation type color will be there. It is missing in the screenshot because @rnugraha disabled it from the menu when making the screenshot. @inodb thanks for the ideas. We discussed with @schultzn in a call and I collected some of his feedback regarding the issue you raised. See last page of RFC 40. @adamabeshouse good point. We could try a light pink color instead of white. #FFC0CB perhaps? |
@pieterlukasse how about a slightly different shape? that could be another way to indicate that its still a mutation of the same type, but with an additional modifier. it might be less confusing than stacking shapes on top of each other. What about making it a diamond instead of a square? or a square with triangles on the top and bottom to make it some kind of elongated diamond. |
@adamabeshouse I think the problem with using a different shape is that it will not be visible when you zoom uit. |
@Sjoerd-van-Hagen that's a good point, that would be a reason to favor the elongated diamond instead of a similar-sized diamond - the elongation would still be visible zoomed out |
@adamabeshouse I am not sure what you mean or how it would remain visible when zooming out? |
@Sjoerd-van-Hagen heres a mockup: I actually agree its not that clear zoomed out. But I also don't think putting a shape in front of the square is good, because it seems to modify the graphic in a way that detracts from it, when the message should be that theres just an EXTRA piece of info about the mutation. Maybe something like this, a little cap on top of the mutation square? |
@adamabeshouse I would then go for a line at the top and the bottom of the square. It will still look good when zooming out and it is easier to implement. |
We won't be able to show all details. I still think the white line looks best - that could be used to indicate the presence of a germline mutation in that gene in that patient. If there are multiple mutations in the same gene and sample, the tooltip can reveal that. |
@rnugraha could you please make the white line thinner and add another screenshot here? The current white color makes the green faded away -- maybe that's part of the confusion. |
@jjgao Riza is out of the office this week. Perhaps @adamabeshouse can do this, if it is not too much trouble? |
@Sjoerd-van-Hagen we can wait for @rnugraha. |
Thanks all for the input and discussion. I would personally agree with the thinner white line. I shall update soon the screenshots. |
Hi all, the PR's description and its screenshots are updated. Please beware that this PR has a dependency on cBioPortal/oncoprintjs#55. One more thing was added: We thought the grey background also will help other rule legends to make the positions of the markers clearer for the user. |
Looks great @rnugraha , thanks for the changes! I like the grey background behind each legend item 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need _germ
in disp_mut
if you're already tracking germline status with disp_germline
? Looks good besides that.
a5c2ca6
to
b404537
Compare
b404537
to
3ab38b7
Compare
@rnugraha I think there was a misunderstanding - changing disp_germline to isGermline doesn't make any difference, the issue is the redundancy between disp_germline and disp_mut. The solution I proposed was to replace every usage of disp_germline with a helper function, isGermline(d) which would check whether disp_mut contained the _germ suffix. In that case you'd have to add genetic rules for each of the disp_mut options. |
Ok make sense. But on the second thought, I'm also going to revisit the other solution you've mentioned on eliminating _germ. Both have their own challenging tasks. |
@adamabeshouse Okay, so different approach. Now only using |
@rnugraha that sounds good, thanks for doing that. The last thing I need to ask is that you implement/adjust end to end tests having to do with the sort order. In home.spec.js, there is a section on oncoprint sorting. I'm not sure whether those tests will be affected by this change. If not, could you just add a simple test of a query that includes germline mutations, and validate the sort order using the method you can find in those tests ( checking the value of |
@adamabeshouse could you re-review this PR and see if it is ready to be merged? |
@adamabeshouse Unit test & e2e have been provided. Could you pls have a look? |
end-to-end-tests/specs/home.spec.js
Outdated
"patient id order correct" | ||
); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, please just add a check for sample order as well
Looks good @rnugraha could you please squash to one commit? |
60159f1
to
98eac9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good besides comments
if (oncoprintMutationType === "fusion") { | ||
dispFusion = true; | ||
} else { | ||
if (event.putativeDriver) { | ||
oncoprintMutationType += "_rec"; | ||
} | ||
dispGermline[oncoprintMutationType] = event.mutationStatus === 'Germline'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be dispGermline[oncoprintMutationType] = dispGermline[oncoprintMutationType] || (event.mutationStatus === 'Germline');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a unit test like "fills a datum w one germline one non- " or something that could catch this
98eac9e
to
6530516
Compare
@adamabeshouse https://github.com/cBioPortal/cbioportal-frontend/pull/913/files#diff-831da00dd128eebcf1b83908cb0fdd1cR84 should cover the unit test for germline flag. Let me know if you think it's not sufficient. |
@rnugraha thanks for making the fix. I think it's a good practice for us to make unit tests for any bugs we find, that's why I think it would be good to have a unit test where a datum is filled using two mutations - the first germline, the second not. |
For testing in backend repo it should also be possible to run the tests without loading frontend over http://localhost:3000. By setting FRONTEND_TEST_DO_NOT_LOAD_EXTERNAL_FRONTEND=true one can disable this. Also include study view and patient view tests, so we can get rid of old end to end tests. Furthermore remove browser version from the filename so the tests dont pass when a different browser version is used.
05c2847
to
32b3809
Compare
@adamabeshouse okay, pls check again |
@rnugraha could you point me to the test, I don't see it? I see a test containing two separate tests w single mutations w germline. I think it would be good to have one test where a datum is filled with two mutations, one is germline and the second is not (thats the key), and the result should be that germline is true. This would catch the bug we're talking about "fills a datum w two germline data correctly" |
@rnugraha it would be great to have a test where fillGeneticTrackDatum is called with data.length = 2, where the first element of data is Germline and the second is not |
ah that what you mean, ok pls check now |
@rnugraha thanks! can you squash your commits and then Ill merge can you also look into the failing end-to-end tests? i think almost all of them wont have to do with these changes but maybe the last failing test about oncoprint sample order? |
8bc40ee
to
607915a
Compare
@adamabeshouse looks like all the failing tests have something to do with unable to reach certain amount of time to display something as well as the last failing test you mentioned. https://github.com/thehyve/cbioportal-frontend/blob/607915a7a919fa83f1bea77df57e382fdcb700f0/end-to-end-tests/specs/home.spec.js#L481 The e2e tests I created to test the germline seems to be fine. |
@rnugraha so |
@adamabeshouse The failed tests were not caused by my changes. The failed tests you saw are also in This PR also does not affect the test with the URL you mentioned in your message. The URL you sent does not have germline mutations. |
What? Why?
Dependency
cBioPortal/oncoprintjs#55
Checks
can be automatically added by git if you run the
git-commit
command withthe
-s
option)Any screenshots or GIFs?
Before
After
In zoom-out
Notify reviewers
Read our Pull request merging
policy. If you are part of the
cBioPortal organization, notify the appropriate team (remove inappropriate):
@cBioPortal/frontend
If you are not part of the cBioPortal organization look at who worked on the
file before you. Please use
git blame <filename>
to determine thatand notify them here: