CoolFace
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes16downloads
Dataset Card

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.

[image]

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.

text
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):
  demo

Repository layout

text
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 instructions

Sub-project summary and data flow

OrderSub-projectReadsProducesDocs
1image_preprocessraw TCGA WSIs, gene-expression matrixdata/40x_grouped_with_gene_expression/<SAMPLE_ID>/wsi/*.png + gene_expression.csvREADME / USAGE
2compute_uni_featuresoutput of step 1data/Patches_hdf5, data/uni_features/<PROJECT>/<SLIDE_ID>/<SLIDE_ID>.h5 (dataset cluster_features)README / USAGE
3src_wsi2rna_modelcluster_features from step 2trained checkpoints under log/<cohort>/<exp_name>/model_best*.ptREADME / USAGE
src_surv_modelraw GeneExpression / CNA / RPPA + GO ontology resources (independent of steps 1-3)FEM resources (FEM_files/<MODAL>/files/) + trained survival checkpoints under model/log/README / USAGE
4demoUNI features (step 2) + WSI2RNA checkpoints (step 3) + FEM resources and a survival checkpoint (from src_surv_model)pipeline_results/ predictions, GO scores, GO-occlusion results, R figuresREADME / USAGE

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

[image]

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

[image]

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.