-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: conditionally enable regression methods based on term type and s… #2586
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
|
||
Fixes: | ||
- conditionally enable regression methods based on term type and show customized Regression chart button if a single method is available |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -581,14 +581,29 @@ const defaultCommonCharts: isSupportedChartCallbacks = { | |
dictionary: () => true, | ||
summary: () => true, | ||
matrix: () => true, | ||
|
||
/* | ||
parent type: regression | ||
child types: linear/logistic/cox | ||
- if parent is disabled, all child types are not accessible | ||
- when parent is accessible, availability of each child type is individually calculated based on data types and allows for ds override for customization | ||
*/ | ||
regression: () => true, | ||
linear: () => true, | ||
logistic: () => true, | ||
cox: () => true, | ||
linear: ({ cohortTermTypes }) => cohortTermTypes.numeric > 0, // numeric term present and could be used as linear outcome | ||
logistic: () => true, // always enabled by default because: numeric/categorical/condition terms could all be used as outcome. later we will support custom samplelst term of two groups as outcome. a ds can provide an override to hide it if needed | ||
cox: ({ cohortTermTypes }) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can add example, 'time to event' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure what u mean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can add examples for comments I meant:
|
||
// requires either survival or condition term as cox outcome | ||
return (cohortTermTypes.survival || 0) + (cohortTermTypes.condition || 0) > 0 | ||
}, | ||
|
||
facet: () => true, | ||
survival: ({ cohortTermTypes }) => cohortTermTypes.survival > 0, | ||
cuminc: ({ cohortTermTypes }) => cohortTermTypes.condition > 0, | ||
|
||
/* | ||
parent type: sampleScatter | ||
child type: dynamicScatter | ||
*/ | ||
sampleScatter: ({ ds, cohortTermTypes }) => { | ||
// corresponds to the "Scatter Plot" chart button. it covers both premade scatter plots, as well as dynamic scatter input ui on clicking the "Scatter Plot" chart button | ||
if (ds.cohort.scatterplots) return true | ||
|
@@ -605,6 +620,7 @@ const defaultCommonCharts: isSupportedChartCallbacks = { | |
if (cohortTermTypes.numeric > 1) return true // numeric is always prefilled for convenience, does not have to check if property exists | ||
return false | ||
}, | ||
|
||
genomeBrowser: ({ ds }) => { | ||
// will need to add more logic | ||
if (ds.queries?.snvindel || ds.queries?.trackLst) return true | ||
|
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.
can you add comments about this login method or do we have any documentation where that is available?
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.
no need; this is a simple temp fix to mimic profile user roles and will be deleted later with proper implementation
to add that the 'proper' implementation is on the backend via the isSupportedChartTypes() overrides and no longer on the client.
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.
ok thanks for explaining