ClassificationCase: R6 Class Representing a diagnostic sample

Description Public fields Methods

Description

ClassificationCase provides a coherent structure to keep all information of one diagnostic case used for methylation prediction within a single object.

Public fields

basename

Basename (prefix of IDAT file).

beta_values

Matrix of beta values.

class_type

Predicted class of sample.

class_votes

Matrix of class probabilities.

cnv

Segmented copy number data created by conumee.

error

Boolean, TRUE if error occured during execution (default: FALSE).

error_code

Contains error code if execution failed (default: NULL).

imputed_n

Number of imputed data points.

n_probes

Number of raw intensity measurements. Used to guess array type.

normalization_method

Method used for normalization.

normalized_data

Object of class MethylSet, generated by minfi's preprocessing functions.

path

Directory containing the input files.

platform

Auto-detected array platform.

purity

List of length 2 with tumor purities estimated with RF_Purify package.

raw_data

Object of type RGSet containing raw array data generated with minfi::read.metharray().

rf

Object of type "randomForest". Contains the classifier object which needs to be supplied while the methods run_classification() or run_workflow().

verbose

Print informative messages (Boolean, default: TRUE).

Methods

Public methods


Method new()

Create a new ClassificationCase instance.

Usage
ClassificationCase$new(basename, path, verbose = TRUE)
Arguments
basename

Basename of sample.

path

Input directory with IDAT files.

verbose

Print informative messages (Default: TRUE).

Returns

A new 'ClassificationCase' object.


Method validate()

Perform input file checks. This is quite extensive actually. After checking whether the input files exists, the data are read (to check for corrupt files) and the information is futher used to investigate whether the files have the same no. of probes. In addition, the array type is guessed based on the number of probes. If any of these steps should go wrong, the program records an error code to help narrow down the problem.

Usage
ClassificationCase$validate(verbose = TRUE)
Arguments
verbose

Print informative messages (Boolean, default: TRUE). Inherits from ClassificationCase$new.


Method terminate()

Internal function to terminate processing and record error code.

Usage
ClassificationCase$terminate(error_code)
Arguments
error_code

Error code encountered.


Method load_data()

Load data for sample

Usage
ClassificationCase$load_data(verbose = TRUE)
Arguments
verbose

Print helpful messages (default: TRUE)


Method normalize_data()

Perform background normalization

Usage
ClassificationCase$normalize_data(preprocess_function = NULL, verbose = TRUE)
Arguments
preprocess_function

Function used for preprocessing of the data. If NULL, will use minfi::preprocessIllumina() to perform background intensity correction (Default: NULL)

verbose

Print helpful messages (default: TRUE)


Method get_betas()

Extract beta values from MethylSet object

Usage
ClassificationCase$get_betas(verbose = TRUE)
Arguments
verbose

Print helpful messages (default: TRUE)


Method impute_data()

Perform missing data imputation

Usage
ClassificationCase$impute_data(imputation_function = NULL, verbose = TRUE)
Arguments
imputation_function

Function used to perform imputation. Has to be able to use matrix of beta values for a single sample as input. If NULL, performs random data imputation (beta values are to fill in gaps are sampled from available data, Default: NULL)

verbose

Print helpful messages (Default: TRUE)


Method run_classification()

Classify tumor sample

Usage
ClassificationCase$run_classification(rf_object, verbose = TRUE)
Arguments
rf_object

RandomForest predictor object

verbose

Print helpful messages (default: TRUE)


Method prepare_cnv()

Prepare copy-number plot

Usage
ClassificationCase$prepare_cnv(verbose = TRUE)
Arguments
verbose

Print helpful messages (default: TRUE)


Method estimate_purity()

Perform tumor purity estimation

Usage
ClassificationCase$estimate_purity(verbose = TRUE)
Arguments
verbose

Print helpful messages (default: TRUE)


Method run_workflow()

Run full sample workflow

Usage
ClassificationCase$run_workflow(rf_object, verbose = TRUE)
Arguments
rf_object

RandomForest predictor object. Passed to run_classification()

verbose

Print helpful messages (default: TRUE)


Method clone()

The objects of this class are cloneable with this method.

Usage
ClassificationCase$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


cgeisenberger/crystalmeth documentation built on Aug. 28, 2020, 9:35 a.m.