plot_agg_regions {NanoMethViz} | R Documentation

## Plot aggregate regions

### Description

Plot aggregate regions

### Usage

    plot_agg_regions(
      x,
      regions,
      features_group = NULL,
      flank = 2000,
      stranded = TRUE,
      span = 0.05,
      palette = ggplot2::scale_colour_brewer(palette = "Set1")
    )

### Arguments

`x` | the NanoMethResult object.
`regions` | a table of regions or GRanges, or a list of such objects. The table of regions must contain chr, strand, start and end columns.
`features_group` | if 'features' is a list, a vector of characters of the same length as the list containing names for each member.
`flank` | the number of flanking bases to add to each side of each region.
`stranded` | TRUE if negative strand features should have coordinates flipped to reflect features like transcription start sites.
`span` | the span for loess smoothing.
`palette` | the colour palette used for groups.

### Value

a ggplot object containing the aggregate methylation trend.

### Examples

    nmr <- load_example_nanomethresult()
    gene_anno <- exons_to_genes(NanoMethViz::exons(nmr))
    plot_agg_regions(nmr, gene_anno)

[Package NanoMethViz version 1.2.0 Index]