r i. r names(resAnchor) {#r resAnchor}

Enrichment plots {.tabset}

The results were then visualized with the plotEnrichment() function:

plts_verdsplit <- plotEnrichment(object, pred_POS_only = FALSE,
                                 label_POS_only = FALSE, splitby = "prediction")
resRmd <- lapply(
  names(plts_verdsplit), 
  function(db) {
    knitr::knit_child(text = c(
    '#### `r db`',
    '',
    '```r',
    'plts_verdsplit[[db]]',
    '```',
    ''
  ), 
  envir = environment(),  
  quiet = TRUE)
  }
)
cat(unlist(resRmd), sep = '\n')

{-}

Note: If < 200 peaks in user-supplied sample, r knitr::asis_output("\u25C7") will be missing from plots.

Summary table

Additional Details

Annotations were derived from a variety of sources and accessed using RLHub (unless custom annotations were supplied by the user). Detailed explanations of each database and type can be found here{target="_blank"}. The valr{target="_blank"} R package was implemented to test the enrichment of these features within the supplied ranges for r object@metadata$sampleName. For additional detail, please refer to the RLSeq::featureEnrich documentation (link{target="_blank"}).


featRes <- rlresult(object, resultName = "featureEnrichment")
spec_now <- paste0(
  "featureEnrichment_",
  gsub(object@metadata$sampleName, pattern = " ", replacement = "_")
)
featRes %>%
  DT::datatable(
    options = list(
          dom = "Bfrtip", 
          scrollX = TRUE,
          pageLength = 6,
          buttons = list(
            extend  = 'collection',
            buttons = list(
              list(extend='csv', filename=spec_now),
              list(extend='excel', filename=spec_now)
            ),
            text    = 'Download'
          )
      ), colnames = c(
        "Database", "Annotation", "# tested peaks", 
        "# total peaks", "# tested annotation ranges", 
        "# total annotation ranges",
        "Mean relative distance to feature", 
        "Mean relative distance to feature (shuffled)", 
        "Pval of relative distance", "Fisher Statistic", 
        "Fisher Statistic (shuffled)", "Fisher pval", 
        "Fisher pval (shuffled)"
      )
  )



Bishop-Laboratory/RLSeq documentation built on Jan. 28, 2023, 11:38 p.m.