-
Notifications
You must be signed in to change notification settings - Fork 270
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
Implement gene set option in plots tab #1432
Conversation
df93632
to
e171ecc
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 this one possible issue, see my comment
@@ -918,7 +1006,7 @@ export default class PlotsTab extends React.Component<IPlotsTabProps,{}> { | |||
/> Apply Log Scale | |||
</label></div> | |||
)} | |||
<div className="form-group" style={{opacity:(axisSelection.dataType === CLIN_ATTR_DATA_TYPE ? 0 : 1)}}> | |||
{(axisSelection.dataType !== CLIN_ATTR_DATA_TYPE && axisSelection.dataType !== GENESET_DATA_TYPE) && (<div className="form-group"> |
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.
I was using opacity
because that way the size of the panel doesn't change, which may be smoother UX. @alisman what do you think?
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.
If you prefer, I can keep the "gene" selection box hidden when selecting the clinical attribute instead of removing it to keep the size of the panel, as you implemented. Be aware though that now there are have four selection boxes (gene and gene set boxes are independent).
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.
@adamabeshouse I agree we want to avoid jumpiness. Oleg, I'm not sure how to ansewr question. I think I need to see it to undersatnd. Can you put screenshot or do demo for me?
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.
@oplantalech would there ever be the gene and geneset box visible at the same time?
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.
@adamabeshouse No. Geneset box only appears when the geneset datatype is selected
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.
@oplantalech would it be possible to reuse the same component, and just insert different options and a different label and a different onChange method?
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.
@adamabeshouse I guess so, but I think it is more logical to be a separate component. If you want to keep the same size for the selection boxes, I can keep the gene box in place without the option to see it when clinical attributes are selected (what you implemented). Will this solve your issue?
@@ -2454,6 +2467,10 @@ export class ResultsViewPageStore { | |||
return new GeneCache(); | |||
} | |||
|
|||
@cached get genesetCache() { |
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.
where is this being used (the cache)? We are actually moving away from using caches like this so I wouldn't bother with this unless there's something i'm misunderstanding. We have implemented a client level cache (not merged yet) that will take care of this in a more abstract way.
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.
It is used in line 1686 of this same file to retrieve the gene sets, similarly as done with genes.
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.
but where is it actually consumed by view layer? like where is cache data actually accessed?
// in that case theres no selected gene displayed so its confusing UX to have "Same gene" as an option | ||
sameGenesetOption = [{ value: SAME_GENESET_OPTION_VALUE, label: `Same gene set (${this.horzSelection.selectedGenesetOption.label})`}]; | ||
} | ||
return (sameGenesetOption || []).concat((this.horzGenesetOptions.result || []) as any[]); |
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.
seems like should be typed with same as horzGenesetOptions.result
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.
i.e. not any[]
e171ecc
to
2699f89
Compare
@@ -477,7 +477,7 @@ function makeAxisDataPromise_Geneset( | |||
const value = d.value; | |||
return { | |||
uniqueSampleKey: d.uniqueSampleKey, | |||
value | |||
value: Number(value) |
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.
wow good find :D
94e02c0
to
47bda20
Compare
Add gene sets in the Plots tab. You test the functionality here: https://cbioportal-test.thehyve.net:8081/cbioportal/