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.

Set up

Libraries

# 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

Functions

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

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

Read in data

Expression data

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"

PLIER model

recount.file <- file.path("data", "recount2_PLIER_data", 
                          "recount_PLIER_model.RDS")
recount.plier <- readRDS(recount.file)

Gene identifier conversion and aggregation

We’re going to use the default behavior of mapIds in MBExpressionPrep, i.e., if there are 1:many mappings, just return the first.

GSE37382

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)

GSE37481

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)

MultiPLIER

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.
LS0tCnRpdGxlOiAiTWVkdWxsb2JsYXN0b21hOiBhcHBseWluZyBNdWx0aVBMSUVSIgpvdXRwdXQ6ICAgCiAgaHRtbF9ub3RlYm9vazogCiAgICB0b2M6IHRydWUKICAgIHRvY19mbG9hdDogdHJ1ZQotLS0KCioqSi4gVGFyb25pIDIwMTgqKgoKSW4gdGhpcyBub3RlYm9vayB3ZSdsbCBwcmVwIG1lZHVsbG9ibGFzdG9tYSBleHByZXNzaW9uIGRhdGEg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