InstaPrismSourceCode
May 15, 2024 · View on GitHub
Built-in Reference for InstaPrism
| reference name | tumor type | #cells used for reference construction | #cell types/cell states | umap | citation | download |
|---|---|---|---|---|---|---|
| BRCA_refPhi | breast cancer | 100,064 | 8/76 | UMAP | Wu et al. 2021 | ↓ |
| CRC_refPhi | colorectal cancer | 371,223 | 15/98 | UMAP | Pelka et al. 2021 | ↓ |
| GBM_refPhi | glioblastoma | 338,564 | 10/57 | cellxgeneLink, UMAP | Ruiz et al. 2022 | ↓ |
| LUAD_refPhi | lung adenocarcinomas | 118,293 | 13/77 | UMAP | Xing et al. 2021 | ↓ |
| OV_refPhi | ovarian cancer | 929,690 | 9/40 | cellxgeneLink, UMAP | Vazquez et al. 2022 | ↓ |
| RCC_refPhi | clear cell renal cell carcinoma | 270,855 | 11/106 | cellxgeneLink, UMAP | Li et al. 2022 | ↓ |
| SKCM_refPhi | skin cutaneous melanoma | 4,645 | 8/23 | UMAP | Tirosh et al. 2016 | ↓ |
Reference validation pipeline
- To reproduce the reference validation results from the paper or to test the reference performance with your own data, clone the repository and go into the InstaPrismSourceCode directory.
git clone https://github.com/humengying0907/InstaPrismSourceCode.git && cd InstaPrismSourceCode
- Make sure that all the packages in
scripts/libraries.Rare installed
# To install InstaPrism & deconvBenchmarking package
library("devtools");
install_github("humengying0907/InstaPrism")
install_github("humengying0907/deconvBenchmarking")
-
Make simulated bulk samples for reference validation. Code to reproduce bulk simulation for each cancer type is listed in
./analysis/bulk_simulation/"cancer type". Asim_bulk.RDSfile will be generated and used in the subsequent validation step. Single cell data used for bulk simulation is downloaded from 3CA repository. -
Reference validation. The script used for deconvolution and performance evaluation is
./analysis/refPhi_validation/evalu_pipeline.R
cd analysis/refPhi_validation
Rscript evalu_pipeline.R -h
## usage: evalu_pipeline.R [-h] [--tumorType <character>]
## [--refName <character> [<character> ...]]
## [--output <character>] [--niter <integer>]
## [--ncore <integer>] [--updateReference <logical>]
## [--key <character>] [--saveDeconvRes <logical>]
##
## InstaPrism reference evaluation pipeline
##
## optional arguments:
## -h, --help show this help message and exit
## --tumorType <character>, -t <character>
## Folder name of the bulk dataset for evaluation. The
## 'sim_bulk.RDS' file located within
## '../bulk_simulation/<tumorType>' will be utilized for
## deconvolution.
## --refName <character> [<character> ...], -n <character> [<character> ...]
## Name of the reference to test. The reference stored in
## '../../refPhi/<refName>_refPhi.RDS' will be loaded as
## the reference. To test multiple references, separate
## each name by a blank space.
## --output <character>, -o <character>
## Output folder name. A 'performance/<output>/'
## directory will be created to store the deconvolution
## results and plots. If not specified, a
## 'performance/<tumorType>/' directory will be created
## to store the results
## --niter <integer> Number of iterations for InstaPrism() function.
## [default: 400]
## --ncore <integer> Number of threads. [default: 16]
## --updateReference <logical>
## A logical variable to determine whether to include
## updated reference in the evaulation. [default: FALSE]
## --key <character> Name of the malignant cell type in the reference,
## required only when updateReference = TRUE. When
## evaluating multiple references, these references need
## to have the same key.
## --saveDeconvRes <logical>
## A logical variable to determine whether to save the
## deconvolution results. [default: FALSE]
Run the following commands to generate the performance summary object theta_performance.RDS and the associated pdf files that visualize the performance of the deconvolution results. An example output is listed in ./analysis/refPhi_validation/performance/CRC. A summarized performance plot can be found at ./analysis/refPhi_validation/performance/performance_summary.png
Rscript evalu_pipeline.R -t BRCA -n BRCA --updateReference TRUE --key "Cancer Epithelial"
Rscript evalu_pipeline.R -t CRC -n CRC --updateReference TRUE --key EpiT
Rscript evalu_pipeline.R -t GBM -n GBM --updateReference TRUE --key Malignant
Rscript evalu_pipeline.R -t LUAD -n LUAD --updateReference TRUE --key Malignant
Rscript evalu_pipeline.R -t OV -n OV --updateReference TRUE --key malignant
Rscript evalu_pipeline.R -t RCC -n RCC --updateReference TRUE --key Malignant
Rscript evalu_pipeline.R -t SKCM -n SKCM --updateReference TRUE --key "Melanoma cells"
Citation
M. Hu and M. Chikina, “InstaPrism: an R package for fast implementation of BayesPrism.” bioRxiv, p. 2023.03.07.531579, Mar. 12, 2023. doi: https://doi.org/10.1101/2023.03.07.531579