Skip to content

loneMT/METANET-analysis

 
 

Repository files navigation

METANET-analysis

DOI

Introduction

MetaNet (Metastasis Network model), is a computational framework developed (1) to assess metastatic risk of a primary tumor, and (2) to stratify patients into risk groups with different propensities of organotropic metastases.

How to Cite

The manuscript of MetaNet is now published on Nature Communications.

Jiang, Biaobin, Quanhua Mu, Fufang Qiu, Xuefeng Li, Weiqi Xu, Jun Yu, Weilun Fu, Yong Cao, and Jiguang Wang. "Machine learning of genomic features in organotropic metastases stratifies progression risk of primary tumors." Nature Communications 12, no. 1 (2021): 1-15.

Datasets

MetaNet is trained and tested by four large datasets:

Please access the data via the links, or follow the instruction to request the data if they are under control.

Use Web Interface

For those "non-coding" people, the easest way to use MetaNet is to access the online version with user-friendly interface at https://wanglab.shinyapps.io/metanet

Software Dependency

MetaNet depends on the following packages:

Please follow the links to install the dependent software. It normally takes minutes to complete the installation. MetaNet was developed and tested in MacOS (v10.15.7) with 16 GB memory.

Demo

MetaNet has two functional modules: Metastatic Risk Assessment (Figure 2 and 3) and Organotropic Stratification (Figure 6).

Metastatic Risk Assessment

This module was developed in R (v3.6.3). It includes two parts: training by metanet_model1_metastatic_risk_assessment_training.R and inference by metanet_model1_metastatic_risk_assessment_inference.R.

To re-train the model by running the training code, it takes relatively long time to train a robust model with good parameter combination. For convenience, we provide the trained model file xgb.model and users can directly load the model to perform metastatic risk assessment and calculate the SHAP value to quantify the contribution of each genomic feature using the inference code:

library(xgboost)

# Load the model: Make sure the model file is in the working directory
xgbmodel <- xgb.load('xgb.model')

# Load the demo data: Read a small example cohort of 10 samples from MSKCC
X <- as.matrix(read.delim('input_X.txt',na.strings = c("NaN"),
                          fill = TRUE,row.names = 1))

# Predict metastatic risk for each sample
mrisk <- predict(xgbmodel, xgb.DMatrix(X, missing = NA))
mrisk <- as.data.frame(mrisk)
rownames(mrisk) <- rownames(X)
head(mrisk)

# Calculate SHAP value for each feature in each sample
shap_contrib <- predict(xgbmodel,xgb.DMatrix(X, missing = NA),
                        predcontrib = TRUE,approxcontrib = FALSE)
shap_contrib <- as.data.frame(shap_contrib)
rownames(shap_contrib) <- rownames(X)
head(shap_contrib)

Organotropic Stratification

This module was developed in Matlab 2017b. The higher version should work well. The entire module is implemented in the Matlab code metanet_model2_organotropic_stratification.m. For convenience to perform survival analysis, we provide a compile-free Matlab function MatSurv.m in this repository, which was developed by Anders Berglund.

Launch Matlab and hit Run button at the EDITOR panel, you will be able to load the processed data input.mat, train the model, and visualize the result by reproducing the stratification of TCGA prostate cancer cohort (Figure 6c). Typically, it takes a couple seconds to run this module.

Y

Contact

For any questions, please contact Professor Jiguang Wang via email: jgwang AT ust DOT hk

About

Analysis and figure code from Jiang et al.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • MATLAB 86.5%
  • R 13.5%