run.refbased: FUNCTIONS run.refbased

View source: R/reference.R

run.refbasedR Documentation

FUNCTIONS run.refbased

Description

Function to link MeDeCom's output to reference methylation profiles. The function returns both the MeDeCom result and a methyalation matrix with reference profiles from the source specified.

Usage

run.refbased(rnb.set, Ks, lambdas, cg_subsets = NULL,
  opt.method = "MeDeCom.cppTAfact", temp.dir = NULL,
  ref.base = "reinius", most.var = NULL, NCORES = 1,
  cluster.settings = NULL, ref.set = NULL, id.col = NULL,
  save.restricted.sites = FALSE)

Arguments

rnb.set

An Object of type RnBSet from the RnBeads package containing methylation information on which the deconvolution is to be performed

Ks

Numeric vector containing the number of components to be computed by MeDeCom

lambdas

Numeric vector specifying the regularzation parameters to be explored

cg_subsets

List of numeric vectors specifying the rows that are to be used in the analysis.

opt.method

Optimization method to be employed. For further information see runMeDeCom

temp.dir

Optional temporary directory to store intermediate results

ref.base

Reference profile data base to be used. Supported are

  • "reinius" A blood cell type reference methylome data set from Reinius et.al. (Reference to be added)

  • "local" The reference data set is provided by the user. If this option is selected, ref.set must not be empty.

most.var

Number specifying the number of most variable to be selected from rnb.set

NCORES

Number of cores to be used for analysis.

cluster.settings

Setting for the environment of a high performance compute cluster. Passed to runMeDeCom

ref.set

A RnBSet object containing a reference data set to be used besides rnb.set. Is only compatible with ref.base="local".

id.col

The name of the column in the sample annotation sheet of ref.set containing the reference cell type. Is only compatible with ref.base="local".

save.restricted.sites

Flag indicating if rnb.set restricted to the most.var sites is to be saved in temp.dir for potential downstream analysis.

Details

This function applied MeDeCom to the specified data set and only support RnBSet objects as inputs. The function internally manipulated the object by selecting the most variable sites according to most.var. This leads to a decrease in the number of rows in the reference profiles to this number.

Please note that an active internet connection is required, since this routine downloads data through the world wide web.

Value

A list object containing two elements

  • "MeDeComSet" Results of applying MeDeCom with the setting above

  • "RefMeth" A matrix containing reference profiles from the specified data set. The number of rows in this matrix has been reduced according to the most variable sites in rnb.set.

Author(s)

Michael Scherer


lutsik/MeDeCom documentation built on Feb. 15, 2023, 11:32 a.m.