MultiAssayExperiment.Rcheck/tests_i386/testthat.Rout
R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(MultiAssayExperiment)
>
> test_check("MultiAssayExperiment")
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
== testthat results ===========================================================
OK: 112 SKIPPED: 0 FAILED: 0
>
> proc.time()
user system elapsed
18.28 0.37 19.79
|
MultiAssayExperiment.Rcheck/tests_x64/testthat.Rout
R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(MultiAssayExperiment)
>
> test_check("MultiAssayExperiment")
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
MltAsE> ## Run the example ExperimentList
MltAsE> example("ExperimentList")
ExprmL> ## Create an empty ExperimentList instance
ExprmL> ExperimentList()
ExperimentList class object of length 0:
ExprmL> ## Create array matrix and AnnotatedDataFrame to create an ExpressionSet class
ExprmL> arraydat <- matrix(data = seq(101, length.out = 20), ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000294241", "ENST00000355076",
ExprmL+ "ENST00000383706","ENST00000234812", "ENST00000383323"),
ExprmL+ c("array1", "array2", "array3", "array4")
ExprmL+ ))
ExprmL> arraypdat <- as(data.frame(
ExprmL+ slope53 = rnorm(4),
ExprmL+ row.names = c("array1", "array2", "array3", "array4")),
ExprmL+ "AnnotatedDataFrame")
ExprmL> ## ExpressionSet constructor
ExprmL> exprdat <- Biobase::ExpressionSet(assayData = arraydat, phenoData = arraypdat)
ExprmL> ## Create a sample methylation dataset
ExprmL> methyldat <- matrix(data = seq(1, length.out = 25), ncol = 5,
ExprmL+ dimnames = list(
ExprmL+ c("ENST00000355076", "ENST00000383706",
ExprmL+ "ENST00000383323", "ENST00000234812", "ENST00000294241"),
ExprmL+ c("methyl1", "methyl2", "methyl3",
ExprmL+ "methyl4", "methyl5")
ExprmL+ ))
ExprmL> ## Create a sample RNASeqGene dataset
ExprmL> rnadat <- matrix(
ExprmL+ data = sample(c(46851, 5, 19, 13, 2197, 507,
ExprmL+ 84318, 126, 17, 21, 23979, 614), size = 20, replace = TRUE),
ExprmL+ ncol = 4,
ExprmL+ dimnames = list(
ExprmL+ c("XIST", "RPS4Y1", "KDM5D", "ENST00000383323", "ENST00000234812"),
ExprmL+ c("samparray1", "samparray2", "samparray3", "samparray4")
ExprmL+ ))
ExprmL> ## Combine to a named list and call the ExperimentList constructor function
ExprmL> ExpList <- list(Affy = exprdat, Methyl450k = methyldat, RNASeqGene = rnadat)
ExprmL> ## Use the ExperimentList constructor
ExprmL> myExperimentList <- ExperimentList(ExpList)
MltAsE> ## Create sample maps for each experiment
MltAsE> exprmap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("array1", "array2", "array3", "array4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> methylmap <- data.frame(
MltAsE+ primary = c("Jack", "Jack", "Jill", "Barbara", "Bob"),
MltAsE+ colname = c("methyl1", "methyl2", "methyl3", "methyl4", "methyl5"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> rnamap <- data.frame(
MltAsE+ primary = c("Jack", "Jill", "Bob", "Barbara"),
MltAsE+ colname = c("samparray1", "samparray2", "samparray3",
MltAsE+ "samparray4"),
MltAsE+ stringsAsFactors = FALSE)
MltAsE> ## Combine as a named list and convert to a DataFrame
MltAsE> mylist <- list(Affy = exprmap, Methyl450k = methylmap, RNASeqGene = rnamap)
MltAsE> ## Create a sampleMap
MltAsE> mySampleMap <- listToMap(mylist)
MltAsE> ## Create an example phenotype data
MltAsE> colDat <- data.frame(sex = c("M", "F", "M", "F"),
MltAsE+ age = 38:41,
MltAsE+ row.names = c("Jack", "Jill", "Bob", "Barbara"))
MltAsE> ## Create a MultiAssayExperiment instance
MltAsE> myMultiAssayExperiment <- MultiAssayExperiment(experiments = ExpList,
MltAsE+ colData = colDat,
MltAsE+ sampleMap = mySampleMap)
== testthat results ===========================================================
OK: 112 SKIPPED: 0 FAILED: 0
>
> proc.time()
user system elapsed
20.28 0.26 21.79
|