knitr::opts_chunk$set(echo = TRUE, collapse = TRUE)
suppressPackageStartupMessages({ library(GenomicSuperSignature) })
Ma et al. proposed a continuous scoring system (PCSS) based on the analysis of eight colorectal cancer microarray datasets comprising 1,867 samples, and found that PCSSs are more closely correlated to microsatellite instability (MSI), grade, stage, and tumor location.
avgLoading <- read.table("data/avg_loadings.csv", header = TRUE, sep = ",") avgLoading <- tibble::column_to_rownames(avgLoading, var="X") colnames(avgLoading) <- paste0("PCSS", 1:4) head(avgLoading)
## If GenomicSuperSignaturePaper is built locally with RAVmodel in inst/extdata data.dir <- system.file("extdata", package = "GenomicSuperSignaturePaper") RAVmodel <- readRDS(file.path(data.dir, "RAVmodel_C2.rds"))
RAVmodel <- getModel("C2", load=TRUE)
RAVmodel
version(RAVmodel)
We identified RAV1575 and RAV834 as the most similar RAVs to PCSS1 and PCSS2, respectively, based on Pearson correlation coefficient.
cg <- intersect(rownames(avgLoading), rownames(RAVmodel)) loading_cor <- abs(stats::cor(avgLoading[cg,], RAVindex(RAVmodel)[cg,], use="pairwise.complete.obs", method="pearson")) max1 <- which.max(loading_cor[1,]) # max. correlation with PCSS1 max2 <- which.max(loading_cor[2,]) # max. correlation with PCSS2
loading_cor[1, max1, drop = FALSE] loading_cor[2, max2, drop = FALSE]
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.