Visualizations and analysis - #8
Open
Houinni wants to merge 8 commits into
Open
Conversation
Vendor the GDC clinical.cart.2025-04-08 clinical.tsv and follow_up.tsv used by the mRNA subtype/clinical harmonization step. follow_up.tsv provides the per-visit days_to_follow_up needed to recover last-contact times for living patients.
Last-contact time was read only from diagnoses.days_to_last_follow_up, a field GDC rarely populates, so every living patient had NA follow-up time and thus no censoring time for survival analysis. Read follow_up.tsv, take the latest days_to_follow_up per case, and combine it with the diagnosis-level field via a row-wise max.
Re-run of combine-subtypes.R after the follow-up fix. The sample- and case-level clinical tables now carry days_to_last_follow_up for living patients (163/164). Also refreshes the low-QC list, duplicate-case tables, and subtype confusion matrices/long tables.
Drive the final-fit rank and every output filename off a single nmf_k variable so k=4, k=5, etc. are each reproducible without overwriting one another (outputs suffixed _k<k>).
Final NMF fit at k=5 (seed 123, brunet, nrun=50): per-sample cluster assignments (sizes 29/84/219/64/100), the fitted model, consensus and per-cluster count diagnostic plots, and a k=5 harmonized labels table. The labels table reuses the existing sample->case mapping with the k5 cluster swapped in, since the file->case link is independent of k.
Kaplan-Meier overall-survival curves plus a log-rank summary for each mRNA subtyping method (consensusOV, Konecny, Helland, Verhaak, Bentink), derived from the sample-level subtype/clinical table.
Keep miRNA data outputs under data/mirna_data, miRNA plots under miRNA_clusters/mirna_plots, and mRNA survival plots under mRNA_clusters/mrna_plots. Add the k5 marker, stability, concordance, and survival artifacts, and remove older duplicate root-level miRNA notebooks, data, and plot copies.
Split the miRNA survival analysis into a KM cohort requiring only time, event, and cluster, while keeping the complete-case clinical covariate filter for Cox models.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
data/mirna_data/, miRNA plots undermiRNA_clusters/mirna_plots/, and mRNA KM plots undermRNA_clusters/mrna_plots/.Validation
df_km: 412 cases, 254 events.Notes
data/tcga-ov-metadata/is ignored locally to avoid committing the large metadata JSON.