impute_bulk_met: Impute/predict bulk methylation states

Description Usage Arguments Value Author(s) See Also Examples

View source: R/process_data.R

Description

Make predictions of missing methylation states, i.e. perfrom imputation using BPRmeth This requires keepin a subset of data as a held out test set during BPRMeth inference or providing a different file that contains chromosome and CpG locations.

Usage

1
impute_bulk_met(obj, anno, test_data = NULL, return_test = FALSE)

Arguments

obj

Output of BPRMeth inference object.

anno

A GRanges object with annotation data, whose format should be similar to read_anno.

test_data

Test data to evaluate performance.

return_test

Whether or not to return a list with the predictions.

Value

A list containing two vectors, the true methylation state and the predicted/imputed methylation states.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

partition_bulk_dataset

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Extract synthetic data
dt <- encode_met

# Partition to train and test set
dt <- partition_bulk_dataset(dt)

# Create basis object
basis_obj <- create_rbf_object(M = 3)

# Run BPRMeth
fit <- infer_profiles_mle(X = dt$met, model = "binomial",
   basis = basis_obj, is_parallel = FALSE, opt_itnmax = 10)

# Perform imputation
imputation_obj <- impute_bulk_met(obj = fit, anno = dt$anno,
                                  test_data = dt$met_test)

andreaskapou/BPRMeth documentation built on June 11, 2020, 10:49 p.m.