data-raw/legacy_scripts/benchmarking.R

# To run any deconvolution method from scratch with the default parameters, the following command can be used


immunedeconv::deconvolute(gene_expression_matrix, method)


# The rows of the gene expression matrix are HGNC gene symbols and the columns are the sample. Method can be one of them listed above.
#
# For example, the following command can be used to run quantiseq over the TCGA GEX matrix in the package


library(immunedeconv)
gex_tcga <- curatedPCaData::mae_tcga[["gex"]]
immunedeconv::deconvolute(gex_tcga, "quantiseq")


# Since the TCGA data in the package is median centered, we also provided a TPM normalized dataset for TCGA prostate cancer samples as a part of the TCGA MAE object. This is solely because the deconvolution methods ideally would require a TPM normalized input. We obtained the TPM normalized GEX data from the a consortium called the '[Open Science Framework (OSF)](https://osf.io/).

# For benchmarking, we compare the deconvolution results results between the data from the OSF repository with the median centred TCGA GEX data from cBioportal, by generating correlation plots.
# The plots below show the comparison of immune cell propotions between TPM normalized data and the median centred TCGA data for every immune cell type generated by Quantiseq as an example. We observe a positive correlation between the results in most cell types.



knitr::include_graphics("vignette_plots/quantiseq_bcells.png")
knitr::include_graphics("vignette_plots/quantiseq_cd8.png")
knitr::include_graphics("vignette_plots/quantiseq_cd4.png")
knitr::include_graphics("vignette_plots/quantiseq_dendritic.png")
knitr::include_graphics("vignette_plots/quantiseq_macrom1.png")
knitr::include_graphics("vignette_plots/quantiseq_macrom2.png")
knitr::include_graphics("vignette_plots/quantiseq_monocyte.png")
knitr::include_graphics("vignette_plots/quantiseq_neutrophils.png")
knitr::include_graphics("vignette_plots/quantiseq_nkcells.png")
knitr::include_graphics("vignette_plots/quantiseq_tregs.png")
knitr::include_graphics("vignette_plots/quantiseq_uncharacterized.png")
Syksy/curatedPCaData documentation built on Nov. 4, 2023, 9:46 a.m.