CarmeloAnthony/Morphology_Function_Framework
Morphology Function Framework This repository links whole-slide-image (WSI) morphology to molecular function and patient survival. It is organized as five sub-projects that run in sequence (with one branch running in parallel), each documented independently with its own README.md and USAGE.md. This top-level document explains how the five sub-projects fit together, what data flows between them, and where to find detailed instructions. Two branches converging on one… See the full description on the dataset page: https://huggingface.co/datasets/CarmeloAnthony/Morphology_Function_Framework.
Morphology Function Framework
This repository links whole-slide-image (WSI) morphology to molecular function and patient survival. It is organized as five sub-projects that run in sequence (with one branch running in parallel), each documented independently with its own README.md and USAGE.md. This top-level document explains how the five sub-projects fit together, what data flows between them, and where to find detailed instructions.
Two branches converging on one joint model
The framework has a Morphology branch (image -> WSI-to-RNA) and a Function branch (molecular data -> Functional Extraction Module -> survival model). Both branches are trained independently, and the demo project is the joint inference stage that combines their outputs.
Morphology branch (WSI):
image_preprocess -> compute_uni_features -> src_wsi2rna_model
Function branch (molecular / GO):
src_surv_model (GeneExpression / CNA / RPPA)
Joint inference (uses checkpoints and resources from both branches):
demoRepository layout
Morphology_Function_Framework/
├── img/ overview/data-download/evaluation figures used in this README
├── image_preprocess/ Step 1 (Morphology): organize 40x WSIs, cut into patches
├── compute_uni_features/ Step 2 (Morphology): patches -> HDF5 -> UNI features -> KMeans cluster_features
├── src_wsi2rna_model/ Step 3 (Morphology): ViS model, cluster_features -> predicted (simulated) gene expression
├── src_surv_model/ Function branch: Functional Extraction Module (FEM) + CoxGNN survival model,
│ trained directly from GeneExpression / CNA / RPPA molecular data
├── demo/ Joint inference: WSI -> simulated GE -> survival risk -> GO interpretation -> R figures
├── README.md this file
└── USAGE.md end-to-end setup and run instructionsSub-project summary and data flow
Only demo reads from more than one sub-project at once; every other sub-project reads only the single upstream directory named in the table above. See USAGE.md for the exact directory layout expected between projects and every runnable command.
Data download
Raw TCGA WSIs, gene-expression/CNA/RPPA matrices, clinical/survival tables, generated patches, UNI features, GO ontology resources, and trained checkpoints are not distributed with this repository. Each sub-project's USAGE.md documents exactly which files must be placed under which path before its scripts can run, and which resources (e.g. the UNI checkpoint, the ViS checkpoint, go-basic.obo) can be downloaded automatically when network access is available.
Evaluation
Quantitative evaluation (C-index, time-dependent AUC/ROC, True GE vs. Simulated-GE agreement, GO high/low group comparisons, and GO-occlusion relevance to survival risk) is produced by src_wsi2rna_model (WSI2RNA metrics), src_surv_model (five-fold CV and hold-out survival metrics, model/figure_script.R), and demo (joint hold-out evaluation and figure_script.R). See each project's USAGE.md for the exact output files.
Getting started
See USAGE.md for a full, ordered, end-to-end walkthrough (environment setup, required input files, exact commands, and expected outputs for every sub-project).
Data and code availability
Raw patient-level data (WSIs, molecular matrices, clinical/survival tables) and trained checkpoints are not included in this repository. Obtain and use them under their applicable access, privacy, and redistribution conditions. Each sub-project ships a .gitignore that excludes these paths by default.
