-
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
Add Total mutations as clinical variable in Plots tab #1275
Add Total mutations as clinical variable in Plots tab #1275
Conversation
082e37a
to
a0bb1d0
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.
just one small change, but looks good
@@ -403,21 +403,44 @@ export default class PlotsTab extends React.Component<IPlotsTabProps,{}> { | |||
|
|||
@computed get clinicalAttributeIdToClinicalAttribute():{[clinicalAttributeId:string]:ClinicalAttribute} { | |||
if (this.props.store.clinicalAttributes.isComplete) { | |||
return this.props.store.clinicalAttributes.result.reduce((map:{[clinicalAttributeId:string]:ClinicalAttribute}, next)=>{ | |||
let _map: {[clinicalAttributeId: string]: ClinicalAttribute} = this.props.store.clinicalAttributes.result.reduce((map:{[clinicalAttributeId:string]:ClinicalAttribute}, next)=>{ |
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.
you can shorten this as _.keyBy(this.props.store.clinicalAttributes.result, c=>c.clinicalAttributeId)
map[next.clinicalAttributeId] = next; | ||
return map; | ||
}, {}); | ||
if (this.props.store.studyIds.isComplete) { | ||
_map["total_mutations"] = { |
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.
its better to make this an enum value or something (look at the enum SpecialAttribute
), at least a constant in this file const TOTAL_MUTATIONS_CLIN_ATTR_ID = "total_mutations"
, then reference that elsewhere below
@adamabeshouse @oplantalech the interface improvement discussed here (cBioPortal/cbioportal#4432) may impact this PR. |
fff97ed
to
6f518bf
Compare
@adamabeshouse I've implemented your suggestions and I've also rebased to rc. Is it possible to include that in the release-1.15.0 branch? @jjgao If the changes you mention are implemented, I think they will affect very little the code I've written. In any case, though, I believe this PR will be merged before those changes are implemented. |
@oplantalech ok to point to release-1.5.0 assuming the current rc (and this pull request) does not contain other new code. I was also asking in issue #4291 whether you would be able to add Fraction of Genome Altered as well? |
I would also like to test it before merging. |
@jjgao Ok, I'll move it into release-1.15.0. Regarding the fraction of genome altered, it's almost ready, once this PR is merged I'm going to open a new one implementing this feature. |
Tested the feature. It looks great 👍 |
Why are the e2e tests failing? |
@jjgao Seems like Total Mutations is now shown in plots tab instead of Diagnosis Age attribute: https://10779-66571349-gh.circle-artifacts.com/0/imageCompare.html. Also, seems like it might be better to log scale total mutations there. Prolly outside of the scope of this pr tho |
@inodb it wouldnt be very hard but yeah probably out of scope of this PR. ill log an issue: cBioPortal/cbioportal#4456 |
I think we should update the screenshot and merge this pr. Log scale can be addressed in another pr. |
@adamabeshouse do u know how the default clinical attribute on plots can be adjusted? Maybe better to keep using Diagnosis Age such that the plots look good. I guess it has to do with the order of clinical attributes in the dropdown menu of oncoprint? |
@inodb its about the order of the clinical attributes list, not related to oncoprint |
ideally test there is adjusted to select |
@oplantalech you can use this command in
that should fix all the failing tests |
6f518bf
to
cb61b40
Compare
@adamabeshouse I've add your command in |
@oplantalech ah, okay so do the exact same thing in |
80e4193
to
b1396e3
Compare
What? Why?
Fix cBioPortal/cbioportal#4291 .
Changes proposed in this pull request:
Checks
can be automatically added by git if you run the
git-commit
command withthe
-s
option)Any screenshots or GIFs?
If this is a new visual feature please add a before/after screenshot or gif
here with e.g. GifGrabber.
Notify reviewers
Read our Pull request merging
policy. If you are part of the
cBioPortal organization, notify the approprate 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: