forked from AlexsLemonade/OpenPBTA-analysis
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pulling survival module from OpenPBTA
- Loading branch information
Showing
42 changed files
with
6,168 additions
and
231 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## Perform survival analysis for samples with | ||
|
||
**Module authors:** Candace Savonen (ALSF CCDL), Run Jin (D3b), Stephanie J. Spielman (ALSF CCDL), Jo Lynne Rokita (D3b) | ||
|
||
In this module, we perform survival analyses by Kaplan-Meier, log-rank, and/or cox regression for samples in OpenPBTA using different covariates. | ||
Detailed information about covariates can be found below. | ||
|
||
|
||
### Usage | ||
```sh | ||
bash run-survival.sh | ||
``` | ||
|
||
### Module contents | ||
|
||
#### Function | ||
`util/survival_models.R` performs kaplan-meier, log rank, or cox regression for univariate and/or multivariate analyses. | ||
- The `survival_analysis` function performs survival modeling and returns a list with three objects: | ||
1. The original model fit object | ||
2. The summary table | ||
3. The original dataframe | ||
- The `fit_save_model` function wraps the function `survival_analysis()` to perform and export a survival model | ||
|
||
|
||
#### Scripts | ||
|
||
`survival-analysis_template.Rmd` shows the usage of function `survival_analysis` to perform Kaplan-Meier, log-rank and cox regression survival analyses. | ||
Particularly, it demonstrates runninng Kaplan-Meier and log-rank survival analysis on a categorical variable, using `germline_sex_estimate` as an example. | ||
It also demonstrates how to run cox regression survival analysis on a continuous variable, using `tmb` (tumor mutation burden) as an example. | ||
|
||
`survival-analysis_subtypes.Rmd` runs the following analyses: | ||
1. Univariate models | ||
- Kaplan-Meier survival analysis on HGG samples by `molecular_subtype` | ||
- Cox regression univariate analysis on HGG samples by `molecular_subtype` | ||
|
||
`survival-analysis_tp53_telomerase.Rmd` runs the following analysis: | ||
1. Univariate models | ||
- extent of tumor resection (cox) | ||
- LGG broad histology (cox) | ||
- HGG broad histology (cox) | ||
- Cancer group (cox) | ||
- Cancer group (log rank) | ||
|
||
2. Multivariate models | ||
- Interaction model: `TP53 classifier score * telomerase score * extent of tumor resection * LGG group` across entire PBTA cohort | ||
- Additive model: `TP53 classifier score + telomerase score + extent of tumor resection + LGG group + HGG_group` across entire PBTA cohort | ||
- Additive models: `TP53 classifier score + telomerase score + extent of tumor resection` for each `cancer_group` | ||
|
||
3. Fit results are saved as `.RDS` files for each analysis | ||
|
||
`survival-analysis_immune.Rmd` runs the following analyses: | ||
1. Univariate models: | ||
- PD-L1 expression (stranded samples only) | ||
|
||
2. Multivariate models: | ||
- CD274 (PD-L1) expression, controlling for RNA library | ||
- `quanTIseq immune cell fractions + extent of tumor resection + LGG broad histology`, across entire PBTA cohort | ||
- `quanTIseq immune cell fractions + CD274 expression + extent of tumor resection + LGG broad histology` across entire PBTA cohort | ||
- `quanTIseq immune cell fractions + CD274 expression + extent of tumor resection` across suitable `cancer_groups` (DECEASED N>=3, thus no LGG) | ||
|
||
|
||
#### Output | ||
|
||
Within the `results` folder are folders containing survival model fit results for each analysis described above. | ||
``` | ||
results/immune/*.RDS (`survival-analysis_immune.Rmd`) | ||
results/subtypes/*.RDS (`survival-analysis_subtypes.Rmd`) | ||
results/template/*.tsv (`survival-analysis_template.Rmd`) | ||
results/tp53_telomerase/*.RDS (`survival-analysis_tp53_telomerase.Rmd`) | ||
``` | ||
|
||
The `plots` folder contains Kaplan-meier curve for the log rank analysis listed in parentheses below. | ||
``` | ||
plots/KM_hgg_subtypes.pdf (`survival-analysis_subtypes.Rmd`) | ||
plots/survival_curve_gender.pdf (`survival-analysis_template.Rmd`) | ||
``` |
Binary file renamed
BIN
+5.73 KB
...al_curve_DMG_H3_K28_v_HGG_H3_wildtype.pdf → ...rvival-analysis/plots/KM_hgg_subtypes.pdf
Binary file not shown.
Binary file modified
BIN
-173 Bytes
(98%)
analyses/survival-analysis/plots/survival_curve_gender.pdf
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+26.1 KB
...ival-analysis/results/immune/cox_per_Diffuse-intrinsic-pontine-glioma_terms_quantiseq.RDS
Binary file not shown.
Binary file added
BIN
+40.1 KB
analyses/survival-analysis/results/immune/cox_per_Diffuse-midline-glioma_terms_quantiseq.RDS
Binary file not shown.
Binary file added
BIN
+73 KB
analyses/survival-analysis/results/immune/cox_per_Ependymoma_terms_quantiseq.RDS
Binary file not shown.
Binary file added
BIN
+56.6 KB
...urvival-analysis/results/immune/cox_per_High-grade-glioma-astrocytoma_terms_quantiseq.RDS
Binary file not shown.
Binary file added
BIN
+97.1 KB
analyses/survival-analysis/results/immune/cox_per_Medulloblastoma_terms_quantiseq.RDS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions
3
analyses/survival-analysis/results/survival_model_DMG_H3_K28_v_HGG_H3_wildtype.tsv
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
analyses/survival-analysis/results/template/cox_regression_tmb.tsv
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,2 @@ | ||
term estimate std.error statistic p.value conf.low conf.high | ||
tmb 0.005170351703977231 0.0020840890711969116 2.480868872369188 0.013106257732241913 0.0010856121838576593 0.009255091224096674 |
4 changes: 4 additions & 0 deletions
4
analyses/survival-analysis/results/template/logrank_gender.tsv
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,4 @@ | ||
germline_sex_estimate N obs exp | ||
Female 987 270 276.4181799066573 | ||
Male 1216 333 326.3838899517439 | ||
Unknown 1 0 0.19793014159880817 |
Binary file added
BIN
+318 KB
...alysis/results/tp53_telomerase/cox_additive_terms_tp53_telomerase_resect_glioma_group.RDS
Binary file not shown.
Binary file added
BIN
+408 KB
...sis/results/tp53_telomerase/cox_interaction_terms_tp53_telomerase_resect_glioma_group.RDS
Binary file not shown.
Binary file added
BIN
+24.6 KB
...tp53_telomerase/cox_per_Atypical-Teratoid-Rhabdoid-Tumor_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+12.2 KB
...tp53_telomerase/cox_per_Diffuse-intrinsic-pontine-glioma_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+22.5 KB
...s/results/tp53_telomerase/cox_per_Diffuse-midline-glioma_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+41.8 KB
...ival-analysis/results/tp53_telomerase/cox_per_Ependymoma_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+32.5 KB
...ts/tp53_telomerase/cox_per_High-grade-glioma-astrocytoma_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+57.2 KB
...analysis/results/tp53_telomerase/cox_per_Medulloblastoma_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+16.1 KB
...s/results/tp53_telomerase/cox_per_Neurofibroma-Plexiform_terms_tp53_telomerase_resect.RDS
Binary file not shown.
Binary file added
BIN
+128 KB
analyses/survival-analysis/results/tp53_telomerase/cox_terms_cancer_group.RDS
Binary file not shown.
Binary file added
BIN
+322 KB
analyses/survival-analysis/results/tp53_telomerase/cox_terms_hgg_group.RDS
Binary file not shown.
Binary file added
BIN
+322 KB
analyses/survival-analysis/results/tp53_telomerase/cox_terms_lgg_group.RDS
Binary file not shown.
Binary file added
BIN
+332 KB
analyses/survival-analysis/results/tp53_telomerase/cox_terms_resect_all.RDS
Binary file not shown.
Binary file added
BIN
+128 KB
analyses/survival-analysis/results/tp53_telomerase/log_rank_survival_per_cancer_group.RDS
Binary file not shown.
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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# K S Gaonkar | ||
# Jo Lynne Rokita (D3b), Run Jin (D3b), and Stephanie Spielman (CCDL) | ||
|
||
# Run fusion_filtering | ||
# Run survival analysis | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
# Set the working directory to the directory of this file | ||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
# Plot survial curves of subtypes in HGG/DMG samples | ||
Rscript -e "rmarkdown::render('analyses/survival-analysis/survival-analysis_HGG_DMG.Rmd')" | ||
Rscript -e "rmarkdown::render('survival-analysis_subtypes.Rmd', clean = TRUE)" | ||
|
||
# Build survival models to assess tp53, telomerase, cancer group, and HGG group effects | ||
Rscript -e "rmarkdown::render('survival-analysis_tp53_telomerase.Rmd', clean = TRUE)" | ||
|
||
# Build survival models to assess molecular subtype, PDL1 expression, and immune cell fraction effects | ||
Rscript -e "rmarkdown::render('survival-analysis_immune.Rmd', clean = TRUE)" |
Oops, something went wrong.