MethylResolver: MethylResolver

Description Usage Arguments Author(s) Examples

View source: R/MethylResolver.R

Description

This function deconvolves bulk methylation data into cell type fractions given a reference signature matrix for each cell type expected in the bulk profile. It also allows for the estimation of unknown content (purity) which allows both relative and absolute cell type fractions to be reported.

Usage

1
2
3
4
MethylResolver(methylMix = NULL, methylSig = MethylSig,
  betaPrime = TRUE, outputPath = "./", outputName = 
  "MethylResolver", doPar = FALSE, numCores = 1, 
  alpha = seq(0.5,0.9,by = 0.05), absolute = TRUE, purityModel = RFmodel)

Arguments

methylMix

MxN (CpGs by samples) matrix of bulk methylation sequencing. Required.

methylSig

MxW (CpGs by cell types) matrix of purified cell type methylation profiles. Default signature is the MethylResolver leukocyte signature.

betaPrime

Deconvolutions are calculated using methylation Beta' values (1-Beta). Indicate whether you are supplying Beta' values (TRUE), or Beta values (FALSE). Default is TRUE.

outputPath

Path to output directory. Default is "./".

outputName

Prefix name to give to the deconvolution output. Default is "MethylResolver".

doPar

Whether to use parallel processing to speed up the deconvolution computation if many samples are present. Default is FALSE.

numCores

Number of cores used for parallel processing to speed up the deconvolution of many samples. Requires doPar = TRUE. Default is 1. numCores = "auto" is max number of cores available minus one.

alpha

Set the alpha parameter for LTS deconvolution. This is the fraction of optimal CpGs from the signature matrix which are used for deconvolution. Must be between 0 and 1. Users can specify a vector or a single number. If a vector is specified, a grid search of the values is conducted and the alpha value that results in the lowest RMSE between the original and reconstructed mixture is selected. Default is seq(0.5,0.9,by = 0.05).

absolute

Whether to compute tumor purity and absolute cell type fractions. Default is TRUE.

purityModel

Random Forest model to predict mixture purity (unknown content) which allows the calculation of absolute cell type fractions. Required if absolute is TRUE. Default is our RF model trained on the consensus purity estimate (CPE) using TCGA data.

Author(s)

Douglas Arneson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Deconvolution with default signature and calculating
# absolute fractions with default RF model:
MethylResolver(methylMix = MethylMix)

# Deconvolution with default signature and calculating
# absolute fractions with default RF model while 
# specifying a particular alpha value:
MethylResolver(methylMix = MethylMix, alpha = 0.5)
  
# Deconvolution with default signature and only
# calculating relative fractions:
MethylResolver(methylMix = MethylMix, absolute = FALSE)
  
# Specify your own signature matrix and RF model for
# calculating absolute fractions:
MethylResolver(methylMix = MethylMix, methylSig = 
MethylSig, purityModel = RFmodel)

darneson/MethylResolver documentation built on March 12, 2020, 4:18 a.m.