plotEnrichment {RLSeq} | R Documentation

## Plot Enrichment Test Results

### Description

Creates a list of plots, one for each annotation database (see RLHub::annotations). These plots show the feature enrichment for the user-supplied sample in comparison to the samples in RLBase. This will only work if you did not use custom annotations with featureEnrich.

### Usage

    plotEnrichment(
      object,
      pred_POS_only = TRUE,
      label_POS_only = FALSE,
      splitby = c("none", "prediction", "label"),
      limits = c(-10, 15),
      returnData = FALSE,
      ...
    )

### Arguments

`object` | An RLRanges object with featureEnrich already run.
`pred_POS_only` | If TRUE, only "POS" predicted samples included (see also predictCondition). Default: TRUE.
`label_POS_only` | If TRUE, only "POS" labeled samples included (samples which are expected to robustly map R-loops, e.g., "D210N" condition R-ChIP data). Default: FALSE.
`splitby` | Metadata by which to split plots. Can be "none", "prediction", or "label".
`limits` | Specify limits on data range. This is used for controlling the infinite estimation of odds ratio resulting from fisher's exact test. To remove limits, set c(-Inf, Inf). Default: c(-10, 15).
`returnData` | If TRUE, plot data is returned instead of plot objects. Default: FALSE
`...` | For internal use.

### Value

A named list of ggplot2::ggplot objects. Names correspond to the annotations provided. See also featureEnrich.

### Examples

    # Example dataset with featureEnrich() already run.
    rlr <- readRDS(system.file("extdata", "rlrsmall.rds", package = "RLSeq"))

    # Make plots, split by prediction
    plotEnrichment(rlr, pred_POS_only = FALSE, splitby = "prediction")

[Package RLSeq version 1.0.0 Index]