J. Taroni 2018
Apply the MultiPLIER (recount2) model to the two datasets prepped in 34-DIPG_data_cleaning
.
`%>%` <- dplyr::`%>%`
source(file.path("util", "plier_util.R"))
Directories for this notebook
# plot and result directory setup for this notebook
plot.dir <- file.path("plots", "35")
dir.create(plot.dir, recursive = TRUE, showWarnings = FALSE)
results.dir <- file.path("results", "35")
dir.create(results.dir, recursive = TRUE, showWarnings = FALSE)
recount.file <- file.path("data", "recount2_PLIER_data",
"recount_PLIER_model.RDS")
recount.plier <- readRDS(recount.file)
# we want this is matrix form, with the gene symbols as rownames
gse50021 <- readr::read_tsv(file.path("data", "expression_data",
"GSE50021_mean_agg.pcl")) %>%
as.data.frame() %>%
tibble::column_to_rownames("Gene") %>%
as.matrix()
Parsed with column specification:
cols(
.default = col_double(),
Gene = col_character()
)
See spec(...) for full column specifications.
e.geod.file <-
file.path("data", "expression_data",
"DIPG_E-GEOD-26576_hgu133plus2_SCANfast_with_GeneSymbol.pcl")
gse26576 <- readr::read_tsv(e.geod.file) %>%
dplyr::select(-EntrezID) %>%
as.data.frame() %>%
tibble::column_to_rownames("GeneSymbol") %>%
as.matrix()
Parsed with column specification:
cols(
.default = col_double(),
EntrezID = col_integer(),
GeneSymbol = col_character()
)
See spec(...) for full column specifications.
|======================= | 19% 2 MB
|======================== | 20% 2 MB
|========================== | 21% 2 MB
|=========================== | 22% 2 MB
|============================= | 24% 2 MB
|============================== | 25% 3 MB
|================================ | 26% 3 MB
|================================= | 28% 3 MB
|=================================== | 29% 3 MB
|===================================== | 30% 3 MB
|====================================== | 31% 3 MB
|======================================== | 33% 3 MB
|========================================= | 34% 4 MB
|=========================================== | 35% 4 MB
|============================================ | 36% 4 MB
|============================================== | 38% 4 MB
|=============================================== | 39% 4 MB
|================================================= | 40% 4 MB
|================================================== | 41% 5 MB
|==================================================== | 43% 5 MB
|===================================================== | 44% 5 MB
|======================================================= | 45% 5 MB
|======================================================== | 46% 5 MB
|========================================================== | 48% 5 MB
|=========================================================== | 49% 5 MB
|============================================================= | 50% 6 MB
|============================================================== | 52% 6 MB
|================================================================ | 53% 6 MB
|================================================================== | 54% 6 MB
|=================================================================== | 55% 6 MB
|===================================================================== | 57% 6 MB
|====================================================================== | 58% 7 MB
|======================================================================== | 59% 7 MB
|========================================================================= | 60% 7 MB
|=========================================================================== | 62% 7 MB
|============================================================================ | 63% 7 MB
|============================================================================== | 64% 7 MB
|=============================================================================== | 65% 7 MB
|================================================================================= | 67% 8 MB
|================================================================================== | 68% 8 MB
|==================================================================================== | 69% 8 MB
|===================================================================================== | 70% 8 MB
|======================================================================================= | 72% 8 MB
|======================================================================================== | 73% 8 MB
|========================================================================================== | 74% 8 MB
|=========================================================================================== | 75% 9 MB
|============================================================================================= | 77% 9 MB
|============================================================================================== | 78% 9 MB
|================================================================================================ | 79% 9 MB
|================================================================================================= | 80% 9 MB
|=================================================================================================== | 82% 9 MB
|==================================================================================================== | 83% 10 MB
|====================================================================================================== | 84% 10 MB
|======================================================================================================= | 85% 10 MB
|========================================================================================================= | 87% 10 MB
|========================================================================================================== | 88% 10 MB
|============================================================================================================ | 89% 10 MB
|============================================================================================================= | 90% 10 MB
|=============================================================================================================== | 92% 11 MB
|================================================================================================================ | 93% 11 MB
|================================================================================================================== | 94% 11 MB
|==================================================================================================================== | 95% 11 MB
|===================================================================================================================== | 97% 11 MB
|======================================================================================================================= | 98% 11 MB
|========================================================================================================================| 99% 12 MB
|=========================================================================================================================| 100% 12 MB
GSE50021
gse50021.b <- GetNewDataB(exprs.mat = gse50021,
plier.model = recount.plier)
Loading required package: PLIER
Loading required package: RColorBrewer
Loading required package: gplots
Attaching package: ‘gplots’
The following object is masked from ‘package:stats’:
lowess
Loading required package: pheatmap
Loading required package: glmnet
Loading required package: Matrix
Loading required package: foreach
Loaded glmnet 2.0-13
Loading required package: knitr
Loading required package: rsvd
Loading required package: qvalue
Save the B
matrix to file
saveRDS(gse50021.b, file = file.path(results.dir, "GSE50021_recount2_B.RDS"))
E-GEOD-26576
Now the next expression dataset
gse26576.b <- GetNewDataB(exprs.mat = gse26576,
plier.model = recount.plier)
Save to file
saveRDS(gse26576.b, file = file.path(results.dir,
"E-GEOD-26576_recount2_B.RDS"))