knitr::opts_chunk$set(echo = TRUE, collapse = TRUE)

Setup

Load package

suppressPackageStartupMessages({
  library(GenomicSuperSignature)
})

PCSSs

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)

RAVmodel

## 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)

RAVs vs. PCSSs

Most similar to PCSS1/2

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]

Session Info

sessionInfo()



shbrief/PCAGenomicSignaturesPaper documentation built on July 31, 2022, 12:41 a.m.