plot_infer_profiles: Plot inferred methylation profiles across a region

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plotting_functions.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

1
2
3
4
5
6
# 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)

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