Skip to contents

Check whether methy.data contains all CpGs required by subtype.model for assigning patients to four prostate cancer DNA methylation subtypes.

Usage

validate.subtype.model.cpgs(methy.data, prop.missing.cutoff = 0.3)

Arguments

methy.data

A data.frame with patients as rows (rownames give patient ids) and column names give CpG ids.

prop.missing.cutoff

The maximum proportion of missing values allowed for each required CpG. KNN imputation is used to impute missing values.

Value

  • val.passed a logical indicating whether the data passed validation

  • check$required.cpgs a vector of CpG ids that are required for predicting the subtypes

  • missing.cpgs a vector of CpG ids that are required but completely missing in the data

  • required.cpgs.with.high.missing a vector of CpG ids that are required and have a proportion of missing values greater than prop.missing.cutoff

Examples

data('example.data');
check <- validate.subtype.model.cpgs(example.data);
stopifnot(check$val.passed);

# CpGs required to fit each model:
#check$required.cpgs;

# CpGs that are required but completely missing in your data:
#check$missing.cpgs;

# CpGs that are required and have a proportion of missing values greater than `prop.missing.cutoff`
#check$required.cpgs.with.high.missing;