plot_infer_profiles {BPRMeth} | R Documentation

## Plot inferred methylation profiles across a region

### Description

Function for plotting the inferred methylation profiles across a given region, and optionally the mean methylation rate together with the observed methylation data, using `ggplot2`.

### Usage

    plot_infer_profiles(
      region = 1,
      obj_prof,
      obj_mean = NULL,
      obs = NULL,
      title = "Inferred profiles",
      x_axis = "genomic region",
      y_axis = "met level",
      x_labels = c("Upstream", "", "Centre", "", "Downstream"),
      ...
    )

### Arguments

`region` | Genomic region number
`obj_prof` | Inferred profile, i.e. output from `infer_profiles_vb` or `infer_profiles_mle`
`obj_mean` | Inferred mean function, i.e. output from `infer_profiles_vb` or `infer_profiles_mle`
`obs` | Methylation data observations, if a list, will extract the specific `region`, if a matrix will plot directly its observations.
`title` | Plot title
`x_axis` | x axis label
`y_axis` | x axis label
`x_labels` | x axis ticks labels
`...` | Additional parameters

### Value

A ggplot2 object.

### Author(s)

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

### See Also

`plot_predicted_expr`, `plot_cluster_profiles`, `boxplot_cluster_expr`

### Examples

    # Fit methylation profiles using 5 RBFs
    basis <- create_rbf_object(M = 5)
    prof <- infer_profiles_vb(X = encode_met$met, model = "binomial",
        basis = basis, is_parallel = FALSE, vb_max_iter = 5)
    # Create the plot
    g <- plot_infer_profiles(region = 16, obj_prof = prof, obs = encode_met$met)

[Package BPRMeth version 1.14.1 Index]