Plots methylation beta values for the CpGs within the given CpG island in the form of error bars. For every group of samples, the mean methylation value is plotted together with the confidence interval. X-axis position of CpG sites represents their true genomic coordinates. Additional information can be included in the plot such as position of genes and exons.

plotCI_meCGI(
  beta_values,
  sample_groups,
  cg_island = NULL,
  include_regions = NULL,
  upstream_bp = 0,
  downstream_bp = 0,
  ...
)

Arguments

beta_values

Data frame with methylation beta values. CpG sites should be listed in the rows with the row names being the Illumina CpG identifiers. Samples should be listed in the columns.

sample_groups

Data frame which defines the sample groups. It has to have two columns, the first column with sample IDs and the second column with the corresponding group.

cg_island

Name of a CpG island. It should be given as a UCSC CpG island name, stating chromosome, the first and the last coordinate (e.g. `"chrX:1-2"`).

include_regions

Regions of CGIs which should be included in the plot besides the island itself. Can take any subset of values `"S_Shelf"`, `"S_Shore"`, `"N_Shore"`, `"N_Shelf"`. By default, only the CpGs inside the island are reported.

upstream_bp

Number of additional base pairs added to the plot to the left. Default value is `0`.

downstream_bp

Number of additional base pairs added to the plot to the right. Default value is `0`.

...

Additional plotting parameters passed to the function `meNet::plotCI_meCpG`.

Value

Vector with names of plotted CpG sites, in the same order as in the plot.

Details

Plots error bars and confidence intervals for beta values of CpGs belonging to a given CGI. This function calls the `meNet::plotCI_meCpG` function where the plotted range is given as the start and the end coordinate of the given CpG island (from 5' end to 3' end). Additionally, CpG island shores and CpG island shelves may be included in the plot. CpG island shores are genomic regions spanning up to 2 kb upstream/downstream from the CpG island. Similarly, CpG island shelves are genomic regions located from 2 to 4 kb upstream/downstream from the CpG island (Bibikova et al. 2011) . If a shelf is included in the plot, also the shore which separates it from the CpG island is included. Furthermore, the plot can be expanded upstream or downstream with parameters `upstream_bp` and `downstream_bp`.

More information can be included on the x-axis, such as the exact position of the CpG island, position of genes and exons or positions of unmeasured CpG sites. For further details, see documentation of the function `meNet::plotCI_meCpG`.

References

Bibikova M, Barnes B, Tsan C, Ho V, Klotzle B, Le JM, Delano D, Zhang L, Schroth GP, Gunderson KL, others (2011). “High density DNA methylation array with single CpG site resolution.” Genomics, 98(4), 288--295.