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

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/Small.R

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

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

Details

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

Value

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

Note

Options (meth, exp, sample, probeInfo, geneInfo) don't need to be all specified. User can input one or more according the needs of the function. Such as get.meth.diff only need meth, sample and probeInfo.

Author(s)

Lijing Yao (maintainer: lijingya@usc.edu)

Examples

1
2
3
4
5
6
7
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")

lijingya/ELMER documentation built on May 21, 2019, 6:14 a.m.