impute_bulk_met {BPRMeth} | R Documentation

## Impute/predict bulk methylation states

### 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

    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

    # 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)

[Package BPRMeth version 1.16.0 Index]