Learn R Programming

ELMER (version 1.4.2)

fetch.mee: fetch.mee to generate MEE.data class object.

Description

fetch.mee is a funtion to take in DNA methylation, RNA expression, sample information probe information and gene annotation generating a MEE.data class object, which is the input for main functions. Options (meth, exp, sample, probeInfo, geneInfo) can take in R object or read files by specifying file paths. When TCGA is specified, sample information will be automatically generated such as Control/Experiment labels.

Usage

fetch.mee(meth, exp, sample, probeInfo, geneInfo, probes = NULL, genes = NULL, TCGA = FALSE)

Arguments

meth
A matrix (R object) or path of XX.rda file which only stores a matrix of DNA methylation data.
exp
A matrix (R object) or path of XX.rda file which only stores a matrix of expression data.
sample
A data frame (R object) or path of XX.rda file which only contains sample information in data frame format.
probeInfo
A GRnage object or path of XX.rda file which only contains a GRange of probe information.
geneInfo
A GRnage object or path of XX.rda file which only contains a GRange of gene information such as Coordinates, GENEID and SYMBOL.
probes
A vector lists name of probes. If probes are specified, the DNA methylation matrix and probeInfo in MEE.data object will be restrained to this list of probes.
genes
A vector lists gene ids. If gene are specified, the methylation and probeInfo in output MEE.data object will be restrained this list of genes.
TCGA
A logical. FALSE indicates that data is not from TCGA (FALSE is default). TRUE indicates data is from TCGA and sample section will automatically filled in.

Value

A MEE.data object containing 5 slots. Detail see MEE.data-class

Details

Use path to load in data will help to reduce memory usage.

Examples

Run this code
meth <- matrix(data=c(1:20),ncol=5,dimnames=list(paste0("probe",1:4),paste0("sample",1:5)))
exp <- matrix(data=c(101:110),ncol=5,dimnames=list(c("gene1","gene2"),paste0("sample",1:5)))
mee <- fetch.mee(meth=meth, exp=exp)
## only fetch probe 1 and 3
mee <- fetch.mee(meth=meth, exp=exp, probes=c("probe1","probe3"))
## only fetch gene 1
mee <- fetch.mee(meth=meth, exp=exp, genes="gene1")

Run the code above in your browser using DataLab