methylpredict: Predict cell contents for new methylation data using an...

View source: R/epdeconv.R

methylpredictR Documentation

Predict cell contents for new methylation data using an ensemble model

Description

Predict cell contents for new methylation data with the model trained from the function epDeconv.

Usage

methylpredict(
  model = NULL,
  normweights = NULL,
  modellist = NULL,
  targetmethyldat,
  resscale = FALSE,
  adjustminus = FALSE
)

Arguments

model

Result returned from the function epDeconv. It contains the deconvoltion ensemble model. Default value is NULL, and in this case, the other two parameters normweights and modellist will be used instead to finish the prediction, if they are not NULL.

modellist

The slot "modellist" of the result of epDeconv, and it provides the base learners of the deconvolution ensemble model. If the parameter model is NULL, it will be used to restore the model, and finish the prediction. Default value is NULL.

targetmethyldat

The target cell mixture methylation data need to be deconvolved. Should be a matrix with each column representing one sample and each row for one feature. Row names are feature names and column names are sample IDs. It is recommended to adjust the batch difference between this dataset and the paired methylation data used by epDeconv with ComBat in advance, and using the paired data as the reference batch when adjusting, so that the cell deconvolution model trained can be used on these target data with the influence from batch difference minimized.

resscale

For each sample, whether its cell contents result should be scaled so that the sum of different cell types is 1. Default is FALSE.

adjustminus

In some extreme situations, the cell contents predicted may be minus values and this parameter indicates whether these minus ones should be changed to 0 in the final result. Default is FALSE.

normweight

The slot "normweigth" of the result of epDeconv. It provides the base learner weights of the deconvolution ensemble model. If model is NULL, this parameter will be used to restore the model and finish the prediction. Default value is NULL.

Value

A matrix recording the cell composition result for the samples.


yuabrahamliu/scDeconv documentation built on March 28, 2024, 3:15 p.m.