-
Notifications
You must be signed in to change notification settings - Fork 288
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 news item about KM/C-PH survival analysis tool using the lifelines package #2112
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
title: "Survival analysis for right censored data using lifelines" | ||
date: "2023-08-11" | ||
authors: Ross Lazarus | ||
authors_structured: | ||
- github: fubar2 | ||
tease: "Kaplan-Meier and Cox proportional hazards models are available for testing in Galaxy" | ||
hide_tease: true | ||
subsites: [all] | ||
--- | ||
|
||
A tool that wraps the [lifelines](https://lifelines.readthedocs.io/en/latest/Survival%20Analysis%20intro.html) package is available | ||
|
||
Any Galaxy tabular data with a column containing time and status in a format suitable for pandas and lifelines can be used as input. | ||
Time might be an integer month since a treatment. Status might be 0 for no failure at observation time, 1 for death or failure. | ||
Other columns can be used as groups for KM, or as covariates for Cox-PH. | ||
|
||
If the data has no header row, the default column names are col1,....coln unless a header parameter, containing column names in order | ||
delimited with "," is supplied on the tool form. | ||
Whatever the source of column names, they must match the ones provided as parameters. | ||
|
||
### Demonstration with the Rossi recidivism data from lifelines tutorials | ||
|
||
Runs Kaplan-Meier and generates a plot. Optional grouping variable. | ||
|
||
Plots show confidence intervals | ||
|
||
 | ||
|
||
If 2 groups, runs a log-rank test for difference. | ||
|
||
 | ||
|
||
If a comma separated list (for example: prio, age, race, mar, fin) of covariate column names is provided, | ||
a Cox proportional hazards model is run, the assumption of proportionality is tested, and | ||
recommendations made. | ||
|
||
 | ||
|
||
Also included are partial plots for each covariate like these from the Rossi recidivism lifelines sample data | ||
used in the tool test. | ||
|
||
 | ||
|
||
 | ||
|
||
Uses pandas read_csv with tabular delimiters so should work with any tabular data with the required columns - time and status for observations. | ||
|
||
Issues to https://github.com/fubar2/lifelines_tool please. | ||
Autogenerated so pull requests are possibly meaningless but regeneration of a new version should work. | ||
|
||
### Installation for testing | ||
|
||
The [lifelines tool](https://toolshed.g2.bx.psu.edu/view/fubar/lifelines_km_cph_tool/dd5e65893cb8), owned by fubar, is available for testing, in the main Galaxy Toolshed. | ||
It is very new and so not suitable for production use yet. Please let me know if it works for you. | ||
|
||
### Tool code | ||
|
||
The tool code is available for review at the <a href="https://github.com/fubar2/lifelines_tool">github repository</a> where issues should | ||
be raised when there are problems or suggestions. This is machine generated code, so pull requests don't | ||
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. A bit redundant to the above |
||
make much sense. The generator can be rerun with simple changes easily so please suggest | ||
any useful things you'd like to see. | ||
|
||
|
||
### Tool made with the [Galaxy ToolFactory](https://github.com/fubar2/galaxy_tf_overlay) | ||
|
||
Galaxy Training Network tutorials [ are available here](https://training.galaxyproject.org/training-material/topics/dev/tutorials/tool-generators/tutorial.html) | ||
|
||
The github repository contains a Galaxy history that was exported after generating the current version of the tool. | ||
If that history is imported into a ToolFactory instance, the generating ToolFactory form can be recreated | ||
using the redo button. Editing the tool id will make a new tool, so edits to parameters can be made and the | ||
new tool generated and tested. | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+79.5 KB
content/news/2023-08-11-lifelineskmcph/lifelines_rossi_schoenfeld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sounds like a bullet point list but not like a sentence.
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.
Thanks for caring :)
Will adjust shortly. Was mostly cut and paste so editing is good....
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.
@bgruening - I trust your meal at Doyles is excellent.
Items are shortened.... ;)
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.
@bgruening - less awful now?