bpr_predict_wrap {BPRMeth} | R Documentation

## (DEPRECATED) Predict gene expression from methylation profiles

### Description

(DEPRECATED) `bpr_predict_wrap` is a function that wraps all the necessary subroutines for performing prediction on gene expression levels. Initially, it optimizes the parameters of the basis functions so as to learn the methylation profiles. Then, uses the learned parameters / coefficients of the basis functions as input features for performing regression in order to predict the corresponding gene expression levels.

### Usage

    bpr_predict_wrap(
      formula = NULL,
      x,
      y,
      model_name = "svm",
      w = NULL,
      basis = NULL,
      train_ind = NULL,
      train_perc = 0.7,
      fit_feature = "RMSE",
      cov_feature = TRUE,
      opt_method = "CG",
      opt_itnmax = 100,
      is_parallel = TRUE,
      no_cores = NULL,
      is_summary = TRUE
    )

### Arguments

`formula` | An object of class `formula`, e.g. see `lm` function. If NULL, the simple linear regression model is used.
`x` | The binomial distributed observations, which has to be a list of elements of length N, where each element is an L x 3 matrix of observations, where 1st column contains the locations. The 2nd and 3rd columns contain the total trials and number of successes at the corresponding locations, repsectively. See `process_haib_caltech_wrap` on a possible way to get this data structure.
`y` | Corresponding gene expression data for each element of the list x.
`model_name` | A string denoting the regression model. Currently, available models are: `"svm"`, `"randomForest"`, `"rlm"`, `"mars"` and `"lm"`.
`w` | Optional vector of initial parameter / coefficient values.
`basis` | Optional basis function object, default is an 'rbf' object, see `create_rbf_object`.
`train_ind` | Optional vector containing the indices for the train set.
`train_perc` | Optional parameter for defining the percentage of the dataset to be used for training set, the remaining will be the test set.
`fit_feature` | Return additional feature on how well the profile fits the methylation data. Either NULL for ignoring this feature or one of the following: 1) "RMSE" for returning the fit of the profile using the RMSE as measure of error or 2) "NLL" for returning the fit of the profile using the Negative Log Likelihood as measure of error.
`cov_feature` | Logical, whether to return an additional feature for the CpG coverage across the promoter region.
`opt_method` | The optimization method to be used. See `optim` for possible methods. Default is "CG".
`opt_itnmax` | Optional argument giving the maximum number of iterations for the corresponding method. See `optim` for details.
`is_parallel` | Logical, indicating if code should be run in parallel.
`no_cores` | Number of cores to be used, default is max_no_cores - 2.
`is_summary` | Logical, print the summary statistics.

### Value

A 'bpr_predict' object which, in addition to the input parameters, consists of the following variables:

- `W_opt`: An Nx(M+1) matrix with the optimized parameter values. Each row of the matrix corresponds to each element of the list x. The columns are of the same length as the parameter vector w (i.e. number of basis functions).

- `Mus`: An N x M matrix with the RBF centers if basis object is `create_rbf_object`, otherwise NULL.

- train: The training data.

- test: The test data.

- `gex_model`: The fitted regression model.

- `train_pred` The predicted values for the training data.

- `test_pred` The predicted values for the test data.

- `train_errors`: The training error metrics.

- `test_errors`: The test error metrics.

### Author(s)

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

### See Also

`bpr_optimize`, `create_basis`

### Examples

    obs <- meth_data
    y   <- gex_data
    basis <- create_rbf_object(M = 5)
    out   <- bpr_predict_wrap(x = obs, y = y, basis = basis,
                              is_parallel = FALSE, opt_itnmax = 3)

[Package BPRMeth version 1.20.0 Index]