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

Customizable Dynamic Kaplan-Meier Plot for Survival Analysis #4900

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

7xuanlu
Copy link
Contributor

@7xuanlu 7xuanlu commented May 2, 2024

Address issue Dynamic KM Plot and RFC 36
This frontend PR aims to have a customizable Dynamic Kaplan-Meier plot that allows users to specify start point and endpoint or censored point for survival analysis.

  • Survival table and survival plot visibility
  • Add start, end, censored clinical events dropdown
  • Add start and end clinical attributes dropdown if available
  • create new session to save custom survival plots
  • Delete a survival plot from table
  • Supports ANY event in censored event dropdown, which would choose the last event as the censored point for specific patient
Screenshot 2024-10-15 at 12 02 52 PM Screenshot 2024-10-15 at 12 03 13 PM Screenshot 2024-10-15 at 12 06 31 PM

Copy link

netlify bot commented May 2, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit c2eaf0f
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/670f0b68e4c508000818ef86
😎 Deploy Preview https://deploy-preview-4900.cancerrevue.org
📱 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.

@7xuanlu 7xuanlu force-pushed the fix-10375 branch 2 times, most recently from 00258c8 to 51e2fef Compare May 22, 2024 16:45
@7xuanlu 7xuanlu force-pushed the fix-10375 branch 2 times, most recently from afa3564 to c4e675c Compare May 31, 2024 19:32
@7xuanlu 7xuanlu force-pushed the fix-10375 branch 3 times, most recently from ca52e19 to 350f297 Compare June 13, 2024 20:53
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shouldn't need package lock. use yarn to add new things, not npm

@@ -75,7 +76,13 @@ export default class GroupComparisonPage extends React.Component<
this.pathwayMapperUserSelectionStore = new GroupComparisonPathwayMapperUserSelectionStore();
this.queryReaction = reaction(
() => this.urlWrapper.query.comparisonId,
sessionId => {
(sessionId, previousSessionId) => {
if (localStorage.getItem('preventPageReload') === 'true') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to understand this

Copy link
Member

Choose a reason for hiding this comment

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

added comment


const survivalPrefixes = _.map(
this.props.store.survivalTitleByPrefix
.result! as Dictionary<string>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't need cast if type properly

}

@observable
public startEventPosition: 'FIRST' | 'LAST' = 'FIRST';
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think this needs to be someone scoped better. i.e. it needs to be somehow associated with the survival plot stuff, not just hanging out here in top level of store.

Copy link
Member

Choose a reason for hiding this comment

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

moved to new tab survival store

@jjgao
Copy link
Member

jjgao commented Oct 15, 2024

When there is only one _status variable, the table will be hidden and there would be no way to add a dynamic KM plot. e.g. https://deploy-preview-4900.cancerrevue.org/comparison/survival?comparisonId=61b4d97bf8f71021ce57c8bf

  • Solution: show the table when there is one _status variable.

When there is no _status variable (no survival data) but there are still timeline data, there is no way currently to add dynamic KM plot.

  • Solution: show the survival tab and table when there is no _status variable AND there are timeline data.

@kalletlak
Copy link
Member

When there is only one _status variable, the table will be hidden and there would be no way to add a dynamic KM plot. e.g. https://deploy-preview-4900.cancerrevue.org/comparison/survival?comparisonId=61b4d97bf8f71021ce57c8bf

  • Solution: show the table when there is one _status variable.

When there is no _status variable (no survival data) but there are still timeline data, there is no way currently to add dynamic KM plot.

  • Solution: show the survival tab and table when there is no _status variable AND there are timeline data.

this is now resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants