AlexsLemonade / OpenPBTA-analysis

The analysis repository for the Open Pediatric Brain Tumor Atlas Project
Other
99 stars 67 forks source link

Zenodo CSVs: Fix forest plots #1722

Closed sjspielman closed 1 year ago

sjspielman commented 1 year ago

Part of #1718

This PR remakes 3 csv exports for forest plots so that the model's underlying data, not the model itself, is what is exported. The figures are -

The exports themselves are fairly simple, but I had to update the survival module to be able to get the data written out for use in these figure scripts. That update was small, just a quick change to the function in analyses/survival-analysis/util/survival_models.R. Rather than only exporting the model object (which does not appear to still hold the input data) in RDS files, I updated the code to export a list of the model and the data that went into the model. This does not affect any survival notebooks beyond the need to re-run them, and the only scripts that consume survival model output are figure scripts (edit - and MS tables, so I also updated reading in models accordingly in https://github.com/AlexsLemonade/OpenPBTA-analysis/pull/1722/commits/0c8d64ae91dbf7f59ce4e6829911b000c65940e1). So, now we can read in data for export along with the model for plotting.

I therefore had to re-run the survival module, so all the RDS result files have changed as expected - they are slightly larger now since they contain the data too. Hence, the diffs.

I also ensured that the exported CSVs have LIVING and DECEASED statuses instead of 1/0 (this was already the case for one of the data frames, but had to be updated for the other two).

sjspielman commented 1 year ago

Noting this PR needs to run through CI.