J. Taroni 2018
In this notebook we’ll prep medulloblastoma expression data (luckily the metadata is already in pretty good shape!) and apply MultiPLIER/recount2 model.
We’re using data from the following publications:
Northcott PA, Shih DJ, Peacock J, et al. Subgroup-specific structural variation across 1,000 medulloblastoma genomes. Nature. 2012;488(7409):49-56. (
GSE37382
)
Robinson G, Parker M, Kranenburg TA, Lu C et al. Novel mutations target distinct subgroups of medulloblastoma. Nature. 2012 Aug 2;488(7409):43-8. (
GSE37418
)
It has been processed with SCAN::SCANfast
through refine.bio.
# we need this library to convert from Ensembl gene identifiers to gene symbols
# for use with PLIER
library(org.Hs.eg.db)
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap,
parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, cbind, colMeans, colnames, colSums, do.call,
duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,
lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position,
rank, rbind, Reduce, rowMeans, rownames, rowSums, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with 'browseVignettes()'. To cite
Bioconductor, see 'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: ‘S4Vectors’
The following object is masked from ‘package:base’:
expand.grid
# magrittr pipe
`%>%` <- dplyr::`%>%`
# need PrepExpressionDF
source(file.path("util", "test_LV_differences.R"))
# need GetNewDataB
source(file.path("util", "plier_util.R"))
Function for working with refine.bio-processed data (e.g., uses Ensembl gene identifiers that must be converted to gene symbols).
MBExpressionPrep <- function(exprs.df) {
# mapIds default behavior -- select whatever it finds first in the case of
# 1:many mappings
gene.symbols.df <-
AnnotationDbi::mapIds(org.Hs.eg.db, keys = exprs.df$Gene,
column = "SYMBOL", keytype = "ENSEMBL") %>%
as.data.frame() %>%
tibble::rownames_to_column("Ensembl")
colnames(gene.symbols.df)[2] <- "Symbol"
# tack on the gene symbols
annot.exprs.df <- gene.symbols.df %>%
dplyr::inner_join(exprs.df, by = c("Ensembl" = "Gene")) %>%
dplyr::select(-Ensembl)
colnames(annot.exprs.df)[1] <- "Gene"
# if there are any duplicate gene symbols, use PrepExpressionDF
if (any(duplicated(annot.exprs.df$Gene))) {
agg.exprs.df <- PrepExpressionDF(exprs = annot.exprs.df) %>%
dplyr::filter(!is.na(Gene))
} else {
return(annot.exprs.df %>% dplyr::filter(!is.na(Gene)))
}
}
# directory that holds all the gene expression matrices
exprs.dir <- file.path("data", "expression_data")
# directories specific to this notebook
plot.dir <- file.path("plots", "37")
dir.create(plot.dir, recursive = TRUE, showWarnings = FALSE)
results.dir <- file.path("results", "37")
dir.create(results.dir, recursive = TRUE, showWarnings = FALSE)
GSE37382
northcott.exprs.file <- file.path(exprs.dir, "GSE37382_SCAN.pcl")
northcott.exprs.df <- readr::read_tsv(northcott.exprs.file)
Parsed with column specification:
cols(
.default = col_double(),
Gene = col_character()
)
See spec(...) for full column specifications.
|==== | 4% 3 MB
|==== | 4% 3 MB
|==== | 4% 3 MB
|==== | 5% 3 MB
|==== | 5% 3 MB
|==== | 5% 3 MB
|===== | 5% 3 MB
|===== | 5% 3 MB
|===== | 5% 4 MB
|===== | 6% 4 MB
|===== | 6% 4 MB
|===== | 6% 4 MB
|===== | 6% 4 MB
|====== | 6% 4 MB
|====== | 6% 4 MB
|====== | 6% 4 MB
|====== | 7% 4 MB
|====== | 7% 5 MB
|====== | 7% 5 MB
|======= | 7% 5 MB
|======= | 7% 5 MB
|======= | 7% 5 MB
|======= | 8% 5 MB
|======= | 8% 5 MB
|======= | 8% 5 MB
|======= | 8% 5 MB
|======== | 8% 6 MB
|======== | 8% 6 MB
|======== | 9% 6 MB
|======== | 9% 6 MB
|======== | 9% 6 MB
|======== | 9% 6 MB
|======== | 9% 6 MB
|========= | 9% 6 MB
|========= | 10% 6 MB
|========= | 10% 6 MB
|========= | 10% 7 MB
|========= | 10% 7 MB
|========= | 10% 7 MB
|========= | 10% 7 MB
|========== | 10% 7 MB
|========== | 11% 7 MB
|========== | 11% 7 MB
|========== | 11% 7 MB
|========== | 11% 7 MB
|========== | 11% 8 MB
|========== | 11% 8 MB
|=========== | 12% 8 MB
|=========== | 12% 8 MB
|=========== | 12% 8 MB
|=========== | 12% 8 MB
|=========== | 12% 8 MB
|=========== | 12% 8 MB
|=========== | 13% 8 MB
|============ | 13% 9 MB
|============ | 13% 9 MB
|============ | 13% 9 MB
|============ | 13% 9 MB
|============ | 13% 9 MB
|============ | 14% 9 MB
|============= | 14% 9 MB
|============= | 14% 9 MB
|============= | 14% 9 MB
|============= | 14% 10 MB
|============= | 14% 10 MB
|============= | 14% 10 MB
|============= | 15% 10 MB
|============== | 15% 10 MB
|============== | 15% 10 MB
|============== | 15% 10 MB
|============== | 15% 10 MB
|============== | 15% 10 MB
|============== | 16% 11 MB
|============== | 16% 11 MB
|=============== | 16% 11 MB
|=============== | 16% 11 MB
|=============== | 16% 11 MB
|=============== | 16% 11 MB
|=============== | 17% 11 MB
|=============== | 17% 11 MB
|=============== | 17% 11 MB
|================ | 17% 12 MB
|================ | 17% 12 MB
|================ | 17% 12 MB
|================ | 17% 12 MB
|================ | 18% 12 MB
|================ | 18% 12 MB
|================ | 18% 12 MB
|================= | 18% 12 MB
|================= | 18% 12 MB
|================= | 18% 13 MB
|================= | 19% 13 MB
|================= | 19% 13 MB
|================= | 19% 13 MB
|================== | 19% 13 MB
|================== | 19% 13 MB
|================== | 19% 13 MB
|================== | 20% 13 MB
|================== | 20% 13 MB
|================== | 20% 14 MB
|================== | 20% 14 MB
|=================== | 20% 14 MB
|=================== | 20% 14 MB
|=================== | 21% 14 MB
|=================== | 21% 14 MB
|=================== | 21% 14 MB
|=================== | 21% 14 MB
|=================== | 21% 14 MB
|==================== | 21% 14 MB
|==================== | 21% 15 MB
|==================== | 22% 15 MB
|==================== | 22% 15 MB
|==================== | 22% 15 MB
|==================== | 22% 15 MB
|==================== | 22% 15 MB
|===================== | 22% 15 MB
|===================== | 23% 15 MB
|===================== | 23% 15 MB
|===================== | 23% 16 MB
|===================== | 23% 16 MB
|===================== | 23% 16 MB
|===================== | 23% 16 MB
|====================== | 24% 16 MB
|====================== | 24% 16 MB
|====================== | 24% 16 MB
|====================== | 24% 16 MB
|====================== | 24% 16 MB
|====================== | 24% 17 MB
|======================= | 25% 17 MB
|======================= | 25% 17 MB
|======================= | 25% 17 MB
|======================= | 25% 17 MB
|======================= | 25% 17 MB
|======================= | 25% 17 MB
|======================= | 25% 17 MB
|======================== | 26% 17 MB
|======================== | 26% 18 MB
|======================== | 26% 18 MB
|======================== | 26% 18 MB
|======================== | 26% 18 MB
|======================== | 26% 18 MB
|======================== | 27% 18 MB
|========================= | 27% 18 MB
|========================= | 27% 18 MB
|========================= | 27% 18 MB
|========================= | 27% 19 MB
|========================= | 27% 19 MB
|========================= | 28% 19 MB
|========================= | 28% 19 MB
|========================== | 28% 19 MB
|========================== | 28% 19 MB
|========================== | 28% 19 MB
|========================== | 28% 19 MB
|========================== | 29% 19 MB
|========================== | 29% 20 MB
|========================== | 29% 20 MB
|=========================== | 29% 20 MB
|=========================== | 29% 20 MB
|=========================== | 29% 20 MB
|=========================== | 29% 20 MB
|=========================== | 30% 20 MB
|=========================== | 30% 20 MB
|============================ | 30% 20 MB
|============================ | 30% 21 MB
|============================ | 30% 21 MB
|============================ | 30% 21 MB
|============================ | 31% 21 MB
|============================ | 31% 21 MB
|============================ | 31% 21 MB
|============================= | 31% 21 MB
|============================= | 31% 21 MB
|============================= | 31% 21 MB
|============================= | 32% 22 MB
|============================= | 32% 22 MB
|============================= | 32% 22 MB
|============================= | 32% 22 MB
|============================== | 32% 22 MB
|============================== | 32% 22 MB
|============================== | 32% 22 MB
|============================== | 33% 22 MB
|============================== | 33% 22 MB
|============================== | 33% 23 MB
|============================== | 33% 23 MB
|=============================== | 33% 23 MB
|=============================== | 33% 23 MB
|=============================== | 34% 23 MB
|=============================== | 34% 23 MB
|=============================== | 34% 23 MB
|=============================== | 34% 23 MB
|=============================== | 34% 23 MB
|================================ | 34% 24 MB
|================================ | 35% 24 MB
|================================ | 35% 24 MB
|================================ | 35% 24 MB
|================================ | 35% 24 MB
|================================ | 35% 24 MB
|================================ | 35% 24 MB
|================================= | 36% 24 MB
|================================= | 36% 24 MB
|================================= | 36% 25 MB
|================================= | 36% 25 MB
|================================= | 36% 25 MB
|================================= | 36% 25 MB
|================================== | 36% 25 MB
|================================== | 37% 25 MB
|================================== | 37% 25 MB
|================================== | 37% 25 MB
|================================== | 37% 25 MB
|================================== | 37% 25 MB
|================================== | 37% 26 MB
|=================================== | 38% 26 MB
|=================================== | 38% 26 MB
|=================================== | 38% 26 MB
|=================================== | 38% 26 MB
|=================================== | 38% 26 MB
|=================================== | 38% 26 MB
|=================================== | 39% 26 MB
|==================================== | 39% 26 MB
|==================================== | 39% 27 MB
|==================================== | 39% 27 MB
|==================================== | 39% 27 MB
|==================================== | 39% 27 MB
|==================================== | 40% 27 MB
|==================================== | 40% 27 MB
|===================================== | 40% 27 MB
|===================================== | 40% 27 MB
|===================================== | 40% 27 MB
|===================================== | 40% 28 MB
|===================================== | 40% 28 MB
|===================================== | 41% 28 MB
|====================================== | 41% 28 MB
|====================================== | 41% 28 MB
|====================================== | 41% 28 MB
|====================================== | 41% 28 MB
|====================================== | 41% 28 MB
|====================================== | 42% 28 MB
|====================================== | 42% 29 MB
|======================================= | 42% 29 MB
|======================================= | 42% 29 MB
|======================================= | 42% 29 MB
|======================================= | 42% 29 MB
|======================================= | 43% 29 MB
|======================================= | 43% 29 MB
|======================================= | 43% 29 MB
|======================================== | 43% 29 MB
|======================================== | 43% 30 MB
|======================================== | 43% 30 MB
|======================================== | 44% 30 MB
|======================================== | 44% 30 MB
|======================================== | 44% 30 MB
|======================================== | 44% 30 MB
|========================================= | 44% 30 MB
|========================================= | 44% 30 MB
|========================================= | 44% 30 MB
|========================================= | 45% 31 MB
|========================================= | 45% 31 MB
|========================================= | 45% 31 MB
|========================================= | 45% 31 MB
|========================================== | 45% 31 MB
|========================================== | 45% 31 MB
|========================================== | 46% 31 MB
|========================================== | 46% 31 MB
|========================================== | 46% 31 MB
|========================================== | 46% 32 MB
|=========================================== | 46% 32 MB
|=========================================== | 46% 32 MB
|=========================================== | 47% 32 MB
|=========================================== | 47% 32 MB
|=========================================== | 47% 32 MB
|=========================================== | 47% 32 MB
|=========================================== | 47% 32 MB
|============================================ | 47% 32 MB
|============================================ | 48% 33 MB
|============================================ | 48% 33 MB
|============================================ | 48% 33 MB
|============================================ | 48% 33 MB
|============================================ | 48% 33 MB
|============================================ | 48% 33 MB
|============================================= | 49% 33 MB
|============================================= | 49% 33 MB
|============================================= | 49% 33 MB
|============================================= | 49% 34 MB
|============================================= | 49% 34 MB
|============================================= | 49% 34 MB
|============================================= | 49% 34 MB
|============================================== | 50% 34 MB
|============================================== | 50% 34 MB
|============================================== | 50% 34 MB
|============================================== | 50% 34 MB
|============================================== | 50% 34 MB
|============================================== | 50% 35 MB
|============================================== | 51% 35 MB
|=============================================== | 51% 35 MB
|=============================================== | 51% 35 MB
|=============================================== | 51% 35 MB
|=============================================== | 51% 35 MB
|=============================================== | 51% 35 MB
|=============================================== | 52% 35 MB
|================================================ | 52% 35 MB
|================================================ | 52% 36 MB
|================================================ | 52% 36 MB
|================================================ | 52% 36 MB
|================================================ | 52% 36 MB
|================================================ | 53% 36 MB
|================================================ | 53% 36 MB
|================================================= | 53% 36 MB
|================================================= | 53% 36 MB
|================================================= | 53% 36 MB
|================================================= | 53% 37 MB
|================================================= | 53% 37 MB
|================================================= | 54% 37 MB
|================================================= | 54% 37 MB
|================================================== | 54% 37 MB
|================================================== | 54% 37 MB
|================================================== | 54% 37 MB
|================================================== | 54% 37 MB
|================================================== | 55% 37 MB
|================================================== | 55% 38 MB
|================================================== | 55% 38 MB
|=================================================== | 55% 38 MB
|=================================================== | 55% 38 MB
|=================================================== | 55% 38 MB
|=================================================== | 56% 38 MB
|=================================================== | 56% 38 MB
|=================================================== | 56% 38 MB
|==================================================== | 56% 38 MB
|==================================================== | 56% 39 MB
|==================================================== | 56% 39 MB
|==================================================== | 57% 39 MB
|==================================================== | 57% 39 MB
|==================================================== | 57% 39 MB
|==================================================== | 57% 39 MB
|===================================================== | 57% 39 MB
|===================================================== | 57% 39 MB
|===================================================== | 58% 39 MB
|===================================================== | 58% 40 MB
|===================================================== | 58% 40 MB
|===================================================== | 58% 40 MB
|===================================================== | 58% 40 MB
|====================================================== | 58% 40 MB
|====================================================== | 58% 40 MB
|====================================================== | 59% 40 MB
|====================================================== | 59% 40 MB
|====================================================== | 59% 40 MB
|====================================================== | 59% 41 MB
|======================================================= | 59% 41 MB
|======================================================= | 59% 41 MB
|======================================================= | 60% 41 MB
|======================================================= | 60% 41 MB
|======================================================= | 60% 41 MB
|======================================================= | 60% 41 MB
|======================================================= | 60% 41 MB
|======================================================== | 60% 41 MB
|======================================================== | 61% 42 MB
|======================================================== | 61% 42 MB
|======================================================== | 61% 42 MB
|======================================================== | 61% 42 MB
|======================================================== | 61% 42 MB
|======================================================== | 61% 42 MB
|========================================================= | 62% 42 MB
|========================================================= | 62% 42 MB
|========================================================= | 62% 42 MB
|========================================================= | 62% 43 MB
|========================================================= | 62% 43 MB
|========================================================= | 62% 43 MB
|========================================================= | 63% 43 MB
|========================================================== | 63% 43 MB
|========================================================== | 63% 43 MB
|========================================================== | 63% 43 MB
|========================================================== | 63% 43 MB
|========================================================== | 63% 43 MB
|========================================================== | 63% 44 MB
|=========================================================== | 64% 44 MB
|=========================================================== | 64% 44 MB
|=========================================================== | 64% 44 MB
|=========================================================== | 64% 44 MB
|=========================================================== | 64% 44 MB
|=========================================================== | 64% 44 MB
|=========================================================== | 65% 44 MB
|============================================================ | 65% 44 MB
|============================================================ | 65% 45 MB
|============================================================ | 65% 45 MB
|============================================================ | 65% 45 MB
|============================================================ | 65% 45 MB
|============================================================ | 66% 45 MB
|============================================================ | 66% 45 MB
|============================================================= | 66% 45 MB
|============================================================= | 66% 45 MB
|============================================================= | 66% 45 MB
|============================================================= | 66% 46 MB
|============================================================= | 67% 46 MB
|============================================================= | 67% 46 MB
|============================================================== | 67% 46 MB
|============================================================== | 67% 46 MB
|============================================================== | 67% 46 MB
|============================================================== | 67% 46 MB
|============================================================== | 68% 46 MB
|============================================================== | 68% 46 MB
|============================================================== | 68% 47 MB
|=============================================================== | 68% 47 MB
|=============================================================== | 68% 47 MB
|=============================================================== | 68% 47 MB
|=============================================================== | 69% 47 MB
|=============================================================== | 69% 47 MB
|=============================================================== | 69% 47 MB
|=============================================================== | 69% 47 MB
|================================================================ | 69% 47 MB
|================================================================ | 69% 48 MB
|================================================================ | 70% 48 MB
|================================================================ | 70% 48 MB
|================================================================ | 70% 48 MB
|================================================================ | 70% 48 MB
|================================================================= | 70% 48 MB
|================================================================= | 70% 48 MB
|================================================================= | 70% 48 MB
|================================================================= | 71% 48 MB
|================================================================= | 71% 49 MB
|================================================================= | 71% 49 MB
|================================================================= | 71% 49 MB
|================================================================== | 71% 49 MB
|================================================================== | 71% 49 MB
|================================================================== | 72% 49 MB
|================================================================== | 72% 49 MB
|================================================================== | 72% 49 MB
|================================================================== | 72% 49 MB
|================================================================== | 72% 50 MB
|=================================================================== | 72% 50 MB
|=================================================================== | 73% 50 MB
|=================================================================== | 73% 50 MB
|=================================================================== | 73% 50 MB
|=================================================================== | 73% 50 MB
|=================================================================== | 73% 50 MB
|==================================================================== | 73% 50 MB
|==================================================================== | 74% 50 MB
|==================================================================== | 74% 51 MB
|==================================================================== | 74% 51 MB
|==================================================================== | 74% 51 MB
|==================================================================== | 74% 51 MB
|==================================================================== | 74% 51 MB
|===================================================================== | 75% 51 MB
|===================================================================== | 75% 51 MB
|===================================================================== | 75% 51 MB
|===================================================================== | 75% 51 MB
|===================================================================== | 75% 52 MB
|===================================================================== | 75% 52 MB
|===================================================================== | 76% 52 MB
|====================================================================== | 76% 52 MB
|====================================================================== | 76% 52 MB
|====================================================================== | 76% 52 MB
|====================================================================== | 76% 52 MB
|====================================================================== | 76% 52 MB
|====================================================================== | 76% 52 MB
|====================================================================== | 77% 53 MB
|======================================================================= | 77% 53 MB
|======================================================================= | 77% 53 MB
|======================================================================= | 77% 53 MB
|======================================================================= | 77% 53 MB
|======================================================================= | 77% 53 MB
|======================================================================= | 78% 53 MB
|======================================================================== | 78% 53 MB
|======================================================================== | 78% 53 MB
|======================================================================== | 78% 54 MB
|======================================================================== | 78% 54 MB
|======================================================================== | 78% 54 MB
|======================================================================== | 79% 54 MB
|======================================================================== | 79% 54 MB
|========================================================================= | 79% 54 MB
|========================================================================= | 79% 54 MB
|========================================================================= | 79% 54 MB
|========================================================================= | 79% 55 MB
|========================================================================= | 80% 55 MB
|========================================================================= | 80% 55 MB
|========================================================================== | 80% 55 MB
|========================================================================== | 80% 55 MB
|========================================================================== | 80% 55 MB
|========================================================================== | 80% 55 MB
|========================================================================== | 81% 55 MB
|========================================================================== | 81% 55 MB
|========================================================================== | 81% 56 MB
|=========================================================================== | 81% 56 MB
|=========================================================================== | 81% 56 MB
|=========================================================================== | 81% 56 MB
|=========================================================================== | 82% 56 MB
|=========================================================================== | 82% 56 MB
|=========================================================================== | 82% 56 MB
|=========================================================================== | 82% 56 MB
|============================================================================ | 82% 56 MB
|============================================================================ | 82% 57 MB
|============================================================================ | 83% 57 MB
|============================================================================ | 83% 57 MB
|============================================================================ | 83% 57 MB
|============================================================================ | 83% 57 MB
|============================================================================= | 83% 57 MB
|============================================================================= | 83% 57 MB
|============================================================================= | 84% 57 MB
|============================================================================= | 84% 57 MB
|============================================================================= | 84% 58 MB
|============================================================================= | 84% 58 MB
|============================================================================= | 84% 58 MB
|============================================================================== | 84% 58 MB
|============================================================================== | 85% 58 MB
|============================================================================== | 85% 58 MB
|============================================================================== | 85% 58 MB
|============================================================================== | 85% 58 MB
|============================================================================== | 85% 58 MB
|=============================================================================== | 85% 59 MB
|=============================================================================== | 86% 59 MB
|=============================================================================== | 86% 59 MB
|=============================================================================== | 86% 59 MB
|=============================================================================== | 86% 59 MB
|=============================================================================== | 86% 59 MB
|=============================================================================== | 86% 59 MB
|================================================================================ | 87% 59 MB
|================================================================================ | 87% 59 MB
|================================================================================ | 87% 60 MB
|================================================================================ | 87% 60 MB
|================================================================================ | 87% 60 MB
|================================================================================ | 87% 60 MB
|================================================================================= | 88% 60 MB
|================================================================================= | 88% 60 MB
|================================================================================= | 88% 60 MB
|================================================================================= | 88% 60 MB
|================================================================================= | 88% 61 MB
|================================================================================= | 88% 61 MB
|================================================================================= | 89% 61 MB
|================================================================================== | 89% 61 MB
|================================================================================== | 89% 61 MB
|================================================================================== | 89% 61 MB
|================================================================================== | 89% 61 MB
|================================================================================== | 89% 61 MB
|================================================================================== | 90% 61 MB
|================================================================================== | 90% 62 MB
|=================================================================================== | 90% 62 MB
|=================================================================================== | 90% 62 MB
|=================================================================================== | 90% 62 MB
|=================================================================================== | 90% 62 MB
|=================================================================================== | 91% 62 MB
|=================================================================================== | 91% 62 MB
|==================================================================================== | 91% 62 MB
|==================================================================================== | 91% 62 MB
|==================================================================================== | 91% 63 MB
|==================================================================================== | 91% 63 MB
|==================================================================================== | 91% 63 MB
|==================================================================================== | 92% 63 MB
|==================================================================================== | 92% 63 MB
|===================================================================================== | 92% 63 MB
|===================================================================================== | 92% 63 MB
|===================================================================================== | 92% 63 MB
|===================================================================================== | 92% 63 MB
|===================================================================================== | 93% 64 MB
|===================================================================================== | 93% 64 MB
|====================================================================================== | 93% 64 MB
|====================================================================================== | 93% 64 MB
|====================================================================================== | 93% 64 MB
|====================================================================================== | 93% 64 MB
|====================================================================================== | 94% 64 MB
|====================================================================================== | 94% 64 MB
|====================================================================================== | 94% 64 MB
|======================================================================================= | 94% 65 MB
|======================================================================================= | 94% 65 MB
|======================================================================================= | 94% 65 MB
|======================================================================================= | 95% 65 MB
|======================================================================================= | 95% 65 MB
|======================================================================================= | 95% 65 MB
|======================================================================================= | 95% 65 MB
|======================================================================================== | 95% 65 MB
|======================================================================================== | 95% 66 MB
|======================================================================================== | 96% 66 MB
|======================================================================================== | 96% 66 MB
|======================================================================================== | 96% 66 MB
|======================================================================================== | 96% 66 MB
|========================================================================================= | 96% 66 MB
|========================================================================================= | 96% 66 MB
|========================================================================================= | 97% 66 MB
|========================================================================================= | 97% 66 MB
|========================================================================================= | 97% 67 MB
|========================================================================================= | 97% 67 MB
|========================================================================================= | 97% 67 MB
|========================================================================================== | 97% 67 MB
|========================================================================================== | 98% 67 MB
|========================================================================================== | 98% 67 MB
|========================================================================================== | 98% 67 MB
|========================================================================================== | 98% 67 MB
|========================================================================================== | 98% 67 MB
|===========================================================================================| 98% 68 MB
|===========================================================================================| 99% 68 MB
|===========================================================================================| 99% 68 MB
|===========================================================================================| 99% 68 MB
|===========================================================================================| 99% 68 MB
|===========================================================================================| 99% 68 MB
|===========================================================================================| 99% 68 MB
|============================================================================================| 100% 68 MB
GSE37418
robinson.exprs.file <- file.path(exprs.dir, "GSE37418.tsv")
robinson.exprs.df <- readr::read_tsv(robinson.exprs.file)
Missing column names filled in: 'X1' [1]Parsed with column specification:
cols(
.default = col_double(),
X1 = col_character()
)
See spec(...) for full column specifications.
|============= | 14% 2 MB
|============= | 15% 2 MB
|============== | 15% 2 MB
|=============== | 16% 2 MB
|=============== | 17% 2 MB
|================ | 17% 2 MB
|================= | 18% 2 MB
|================= | 19% 3 MB
|================== | 19% 3 MB
|================== | 20% 3 MB
|=================== | 21% 3 MB
|==================== | 21% 3 MB
|==================== | 22% 3 MB
|===================== | 23% 3 MB
|====================== | 23% 3 MB
|====================== | 24% 3 MB
|======================= | 25% 4 MB
|======================= | 26% 4 MB
|======================== | 26% 4 MB
|========================= | 27% 4 MB
|========================= | 28% 4 MB
|========================== | 28% 4 MB
|=========================== | 29% 4 MB
|=========================== | 30% 4 MB
|============================ | 30% 4 MB
|============================ | 31% 5 MB
|============================= | 32% 5 MB
|============================== | 32% 5 MB
|============================== | 33% 5 MB
|=============================== | 34% 5 MB
|================================ | 34% 5 MB
|================================ | 35% 5 MB
|================================= | 36% 5 MB
|================================== | 36% 5 MB
|================================== | 37% 6 MB
|=================================== | 38% 6 MB
|=================================== | 39% 6 MB
|==================================== | 39% 6 MB
|===================================== | 40% 6 MB
|===================================== | 41% 6 MB
|====================================== | 41% 6 MB
|======================================= | 42% 6 MB
|======================================= | 43% 6 MB
|======================================== | 43% 7 MB
|======================================== | 44% 7 MB
|========================================= | 45% 7 MB
|========================================== | 45% 7 MB
|========================================== | 46% 7 MB
|=========================================== | 47% 7 MB
|============================================ | 47% 7 MB
|============================================ | 48% 7 MB
|============================================= | 49% 7 MB
|============================================== | 50% 8 MB
|============================================== | 50% 8 MB
|=============================================== | 51% 8 MB
|=============================================== | 52% 8 MB
|================================================ | 52% 8 MB
|================================================= | 53% 8 MB
|================================================= | 54% 8 MB
|================================================== | 54% 8 MB
|=================================================== | 55% 8 MB
|=================================================== | 56% 9 MB
|==================================================== | 56% 9 MB
|===================================================== | 57% 9 MB
|===================================================== | 58% 9 MB
|====================================================== | 59% 9 MB
|====================================================== | 59% 9 MB
|======================================================= | 60% 9 MB
|======================================================== | 61% 9 MB
|======================================================== | 61% 9 MB
|========================================================= | 62% 10 MB
|========================================================== | 63% 10 MB
|========================================================== | 63% 10 MB
|=========================================================== | 64% 10 MB
|============================================================ | 65% 10 MB
|============================================================ | 65% 10 MB
|============================================================= | 66% 10 MB
|============================================================= | 67% 10 MB
|============================================================== | 68% 10 MB
|=============================================================== | 68% 11 MB
|=============================================================== | 69% 11 MB
|================================================================ | 70% 11 MB
|================================================================= | 70% 11 MB
|================================================================= | 71% 11 MB
|================================================================== | 72% 11 MB
|=================================================================== | 72% 11 MB
|=================================================================== | 73% 11 MB
|==================================================================== | 74% 11 MB
|==================================================================== | 74% 12 MB
|===================================================================== | 75% 12 MB
|====================================================================== | 76% 12 MB
|====================================================================== | 77% 12 MB
|======================================================================= | 77% 12 MB
|======================================================================== | 78% 12 MB
|======================================================================== | 79% 12 MB
|========================================================================= | 79% 12 MB
|========================================================================== | 80% 12 MB
|========================================================================== | 81% 13 MB
|=========================================================================== | 81% 13 MB
|============================================================================ | 82% 13 MB
|============================================================================ | 83% 13 MB
|============================================================================= | 84% 13 MB
|============================================================================== | 84% 13 MB
|============================================================================== | 85% 13 MB
|=============================================================================== | 86% 13 MB
|=============================================================================== | 86% 13 MB
|================================================================================ | 87% 14 MB
|================================================================================= | 88% 14 MB
|================================================================================= | 89% 14 MB
|================================================================================== | 89% 14 MB
|=================================================================================== | 90% 14 MB
|=================================================================================== | 91% 14 MB
|==================================================================================== | 91% 14 MB
|===================================================================================== | 92% 14 MB
|===================================================================================== | 93% 15 MB
|====================================================================================== | 94% 15 MB
|======================================================================================= | 94% 15 MB
|======================================================================================= | 95% 15 MB
|======================================================================================== | 96% 15 MB
|========================================================================================= | 96% 15 MB
|========================================================================================= | 97% 15 MB
|========================================================================================== | 98% 15 MB
|===========================================================================================| 98% 15 MB
|===========================================================================================| 99% 16 MB
|============================================================================================| 100% 16 MB
colnames(robinson.exprs.df)[1] <- "Gene"
recount.file <- file.path("data", "recount2_PLIER_data",
"recount_PLIER_model.RDS")
recount.plier <- readRDS(recount.file)
We’re going to use the default behavior of mapIds
in MBExpressionPrep
, i.e., if there are 1:many mappings, just return the first.
Prepare the Northcott, et al. data
northcott.prepped.df <- MBExpressionPrep(northcott.exprs.df)
'select()' returned 1:many mapping between keys and columns
northcott.agg.file <- file.path(exprs.dir, "GSE37382_mean_agg.pcl")
readr::write_tsv(northcott.prepped.df, path = northcott.agg.file)
Remove the data.frame
that are large and no longer necessary.
rm(northcott.exprs.df)
Prep the Robinson, et al. data
robinson.prepped.df <- MBExpressionPrep(robinson.exprs.df)
'select()' returned 1:many mapping between keys and columns
robinson.agg.file <- file.path(exprs.dir, "GSE37418_mean_agg.pcl")
readr::write_tsv(robinson.prepped.df, path = robinson.agg.file)
Once the data have been prepped, apply MulitPLIER model. We’ll use the short wrapper function below since we have to do this twice. It is only intended to be used in this environment (e.g., recount.plier
is in the global environment) which is why we’ve placed it here.
MBMultiPLIER <- function(agg.exprs.df, output.file) {
# need a matrix where the gene symbols are row names
exprs.mat <- agg.exprs.df %>%
tibble::column_to_rownames("Gene") %>%
as.matrix()
# apply the MultPLIER model
b.matrix <- GetNewDataB(exprs.mat = exprs.mat,
plier.model = recount.plier)
# save to file!
saveRDS(b.matrix, output.file)
}
Northcott, et al. data
MBMultiPLIER(agg.exprs.df = northcott.prepped.df,
output.file = file.path(results.dir,
"GSE37382_recount2_B.RDS"))
Setting row names on a tibble is deprecated.Loading required package: PLIER
Loading required package: RColorBrewer
Loading required package: gplots
Attaching package: ‘gplots’
The following object is masked from ‘package:IRanges’:
space
The following object is masked from ‘package:S4Vectors’:
space
The following object is masked from ‘package:stats’:
lowess
Loading required package: pheatmap
Loading required package: glmnet
Loading required package: Matrix
Attaching package: ‘Matrix’
The following object is masked from ‘package:S4Vectors’:
expand
Loading required package: foreach
Loaded glmnet 2.0-13
Loading required package: knitr
Loading required package: rsvd
Loading required package: qvalue
Robinson, et al. data
MBMultiPLIER(agg.exprs.df = robinson.prepped.df,
output.file = file.path(results.dir,
"GSE37418_recount2_B.RDS"))
Setting row names on a tibble is deprecated.