# 1 Basic genomic regions exploration

Project: Example bumphunter.

# 2 Introduction

This report is meant to help explore a set of genomic regions and was generated using the `regionReport` (Collado-Torres, Jaffe, and Leek, 2016) package. While the report is rich, it is meant to just start the exploration of the results and exemplify some of the code used to do so. If you need a more in-depth analysis for your specific data set you might want to use the `customCode` argument.

Most plots were made with using `ggplot2` (Wickham, 2016).

## 2.1 Code setup

    ## knitrBoostrap and device chunk options
    library('knitr')
    opts_chunk$set(bootstrap.show.code = FALSE, dev = device)
    if(!outputIsHTML) opts_chunk$set(bootstrap.show.code = FALSE, dev = device, echo = FALSE)

    #### Libraries needed

    ## Bioconductor
    library('bumphunter')
    library('derfinder')
    library('derfinderPlot')
    library('GenomeInfoDb')
    library('GenomicRanges')
    library('ggbio')

    ## Loading required package: ggplot2

    ## Need specific help about ggbio? try mailing
    ##  the maintainer or visit http://tengfei.github.com/ggbio/

    ##
    ## Attaching package: 'ggbio'

    ## The following objects are masked from 'package:ggplot2':
    ##
    ##     geom_bar, geom_rect, geom_segment, ggsave, stat_bin, stat_identity,
    ##     xlim

    ## Transcription database to use by default
    if(is.null(txdb)) {
        library('TxDb.Hsapiens.UCSC.hg19.knownGene')
        txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene::TxDb.Hsapiens.UCSC.hg19.knownGene
    }

    ## Loading required package: GenomicFeatures

    ## Loading required package: AnnotationDbi

    ## Loading required package: Biobase

    ## Welcome to Bioconductor
    ##
    ##     Vignettes contain introductory material; view with
    ##     'browseVignettes()'. To cite Bioconductor, see
    ##     'citation("Biobase")', and for packages 'citation("pkgname")'.

    ## CRAN
    library('ggplot2')
    if(!is.null(theme)) theme_set(theme)
    library('grid')
    library('gridExtra')

    ##
    ## Attaching package: 'gridExtra'

    ## The following object is masked from 'package:Biobase':
    ##
    ##     combine

    ## The following object is masked from 'package:BiocGenerics':
    ##
    ##     combine

    library('knitr')
    library('RColorBrewer')
    library('mgcv')

    ## Loading required package: nlme

    ##
    ## Attaching package: 'nlme'

    ## The following object is masked from 'package:IRanges':
    ##
    ##     collapse

    ## This is mgcv 1.8-31. For overview type 'help("mgcv-package")'.

    library('whisker')
    library('DT')
    library('sessioninfo')

    #### Code setup

    ## For ggplot
    tmp <- regions
    names(tmp) <- seq_len(length(tmp))
    regions.df <- as.data.frame(tmp)
    regions.df$width <- width(tmp)
    rm(tmp)

    ## Special subsets: need at least 3 points for a density plot
    keepChr <- table(regions.df$seqnames) > 2
    regions.df.plot <- subset(regions.df, seqnames %in% names(keepChr[keepChr]))

    if(hasSignificant) {
        ## Keep only those sig
        regions.df.sig <- regions.df[significantVar, ]
        keepChr <- table(regions.df.sig$seqnames) > 2
        regions.df.sig <- subset(regions.df.sig, seqnames %in% names(keepChr[keepChr]))
    }

    ## Find which chrs are present in the data set
    chrs <- levels(seqnames(regions))

    ## areaVar initialize
    areaVar <- NULL

# 3 Quality checks

## 3.1 Region width

    p2a <- ggplot(regions.df.plot, aes(x=log10(width), colour=seqnames)) +
        geom_line(stat='density') + labs(title='Density of region lengths') +
        xlab('Region width (log10)') + scale_colour_discrete(limits=chrs) +
        theme(legend.title=element_blank())
    p2a

This plot shows the density of the region lengths for all regions.

    for(i in seq_len(length(densityVars))) {
        densityVarName <- names(densityVars[i])
        densityVarName <- ifelse(is.null(densityVarName), densityVars[i], densityVarName)
       cat(knit_child(text = whisker.render(templateDensityInUse, list(varName = densityVars[i], densityVarName = densityVarName)), quiet = TRUE), sep = '\n')
    }

## 3.2 Area

    p3aarea <- ggplot(regions.df.plot[is.finite(regions.df.plot[, 'area']), ], aes(x=area, colour=seqnames)) +
        geom_line(stat='density') + labs(title='Density of Area') +
        xlab('Area') + scale_colour_discrete(limits=chrs) +
        theme(legend.title=element_blank())
    p3aarea

This plot shows the density of the Area for all regions.

## 3.3 Value

    p3avalue <- ggplot(regions.df.plot[is.finite(regions.df.plot[, 'value']), ], aes(x=value, colour=seqnames)) +
        geom_line(stat='density') + labs(title='Density of Value') +
        xlab('Value') + scale_colour_discrete(limits=chrs) +
        theme(legend.title=element_blank())
    p3avalue

This plot shows the density of the Value for all regions.

## 3.4 Cluster Length

    p3aclusterL <- ggplot(regions.df.plot[is.finite(regions.df.plot[, 'clusterL']), ], aes(x=clusterL, colour=seqnames)) +
        geom_line(stat='density') + labs(title='Density of Cluster Length') +
        xlab('Cluster Length') + scale_colour_discrete(limits=chrs) +
        theme(legend.title=element_blank())
    p3aclusterL

This plot shows the density of the Cluster Length for all regions.

# 4 Genomic overview

The following plots were made using `ggbio` (Yin, Cook, and Lawrence, 2012) which in turn uses `ggplot2` (Wickham, 2016). For more details check `plotOverview` in `derfinderPlot` (Collado-Torres, Jaffe, and Leek, 2017).

## 4.1 P-values

This plot shows the genomic locations of the regions found in the analysis. The significant regions are highlighted and the of the regions is shown on top of each chromosome (skipped because there was no applicable variable).

## 4.2 Annotation

    ## Annotate regions with bumphunter
    if(is.null(annotation)) {
        genes <- annotateTranscripts(txdb = txdb)
        annotation <- matchGenes(x = regions, subject = genes)
    }

    ## Make the plot
    plotOverview(regions=regions, annotation=annotation, type='annotation', base_size=overviewParams$base_size, areaRel=overviewParams$areaRel, legend.position=c(0.97, 0.12))

This genomic overview plot shows the annotation region type for the regions as determined using `bumphunter` (Jaffe, Murakami, Lee, Leek, et al., 2012). Note that the regions are shown only if the annotation information is available. Below is a table of the actual number of results per annotation region type.

    annoReg <- table(annotation$region, useNA='always')
    annoReg.df <- data.frame(Region=names(annoReg), Count=as.vector(annoReg))
    if(outputIsHTML) {
        kable(annoReg.df, format = 'markdown', align=rep('c', 3))
    } else {
        kable(annoReg.df)
    }

Region | Count
--- | ---
upstream | 10
promoter | 0
overlaps 5’ | 0
inside | 0
overlaps 3’ | 0
close to 3’ | 0
downstream | 5
covers | 0
NA | 0

## 4.3 Annotation (significant)

This genomic overview plot shows the annotation region type for the statistically significant regions. Note that the regions are shown only if the annotation information is available. Plot skipped because there are no significant regions.

# 5 Best regions

## 5.1 Genomic states

Below is a table summarizing the number of genomic states per region as determined using `derfinder` (Collado-Torres, Nellore, Frazee, Wilks, et al., 2017).

    ## Construct genomic state object
    genomicState <- makeGenomicState(txdb = txdb, chrs = chrs, verbose = FALSE)

    ## 'select()' returned 1:1 mapping between keys and columns

    ## Annotate regions by genomic state
    annotatedRegions <- annotateRegions(regions, genomicState$fullGenome, verbose = FALSE)

    ## Genomic states table
    info <- do.call(rbind, lapply(annotatedRegions$countTable, function(x) { data.frame(table(x)) }))
    colnames(info) <- c('Number of Overlapping States', 'Frequency')
    info$State <- gsub('\\..*', '', rownames(info))
    rownames(info) <- NULL
    if(outputIsHTML) {
        kable(info, format = 'markdown', align=rep('c', 4))
    } else {
        kable(info)
    }

Number of Overlapping States | Frequency | State
--- | --- | ---
0 | 15 | exon
1 | 15 | intergenic
0 | 15 | intron

The following is a venn diagram showing how many regions overlap known exons, introns, and intergenic segments, none of them, or multiple of these groups.

    ## Venn diagram for all regions
    venn <- vennRegions(annotatedRegions, counts.col = 'blue',
        main = 'Regions overlapping genomic states')

## 5.2 Region information

Below is an interactive table with the top 15 regions (out of 15) as ranked by p-value without ranking because no p-value information was provided. Inf and -Inf are shown as 1e100 and -1e100 respectively. Use the search function to find your region of interest or sort by one of the columns.

    ## Add annotation information
    regions.df <- cbind(regions.df, annotation)

    ## Rank by p-value (first pvalue variable supplied)
    if(hasPvalueVars){
        topRegions <- head(regions.df[order(regions.df[, pvalueVars[1]],
            decreasing = FALSE), ], nBestRegions)
        topRegions <- cbind(data.frame('pvalueRank' = seq_len(nrow(topRegions))),
            topRegions)
    } else {
        topRegions <- head(regions.df, nBestRegions)
    }

    ## Clean up -Inf, Inf if present
    ## More details at https://github.com/ramnathv/rCharts/issues/259
    replaceInf <- function(df, colsubset=seq_len(ncol(df))) {
        for(i in colsubset) {
            inf.idx <- !is.finite(df[, i])
            if(any(inf.idx)) {
                inf.sign <- sign(df[inf.idx, i])
                df[inf.idx, i] <- inf.sign * 1e100
            }
        }
        return(df)
    }
    topRegions <- replaceInf(topRegions, which(sapply(topRegions, function(x) {
        class(x) %in% c('numeric', 'integer')})))

    ## Make the table
    greptext <- 'value$|area$|mean|log2FoldChange'
    greppval <- 'pvalues$|qvalues$|fwer$'
    if(hasPvalueVars) {
        greppval <- paste0(paste(pvalueVars, collapse = '$|'), '$|', greppval)
    }
    if(hasDensityVars) {
        greptext <- paste0(paste(densityVars, collapse = '$|'), '$|', greptext)
    }

    for(i in which(grepl(greppval, colnames(topRegions)))) topRegions[, i] <- format(topRegions[, i], scientific = TRUE)

    if(outputIsHTML) {
        datatable(topRegions, options = list(pagingType='full_numbers', pageLength=10, scrollX='100%'), rownames = FALSE) %>% formatRound(which(grepl(greptext, colnames(topRegions))), digits)
    } else {
        ## Only print the top part if your output is a PDF file
        df_top <- head(topRegions, 20)
        for(i in which(grepl(greptext, colnames(topRegions)))) df_top[, i] <- round(df_top[, i], digits)
        kable(df_top)
    }

# 6 Reproducibility

This report was generated in path C:/Users/biocbuild/bbs-3.10-bioc/tmpdir/RtmpwRnpDS/Rbuild1bcc2a9128f4/regionReport/vignettes using the following call to `renderReport()`:

    ## renderReport(regions = regions, project = "Example bumphunter",
    ##     pvalueVars = NULL, densityVars = c(Area = "area", Value = "value",
    ##         `Cluster Length` = "clusterL"), significantVar = NULL,
    ##     outdir = ".", output = "bumphunterExampleOutput", device = "png",
    ##     template = "regionReportBumphunter.Rmd")

Date the report was generated.

    ## [1] "2020-03-16 22:21:14 EDT"

Wallclock time spent generating the report.

    ## Time difference of 1.82 mins

`R` session information.

    ## - Session info -------------------------------------------------------------------------------------------------------
    ##  setting  value
    ##  version  R version 3.6.3 (2020-02-29)
    ##  os       Windows Server 2012 R2 x64
    ##  system   x86_64, mingw32
    ##  ui       RTerm
    ##  language (EN)
    ##  collate  C
    ##  ctype    English_United States.1252
    ##  tz       America/New_York
    ##  date     2020-03-16
    ##
    ## - Packages -----------------------------------------------------------------------------------------------------------
    ##  package                           * version  date       lib source
    ##  acepack                             1.4.1    2016-10-29 [2] CRAN (R 3.6.3)
    ##  annotate                            1.64.0   2020-03-16 [2] Bioconductor
    ##  AnnotationDbi                     * 1.48.0   2020-03-16 [2] Bioconductor
    ##  AnnotationFilter                    1.10.0   2020-03-16 [2] Bioconductor
    ##  askpass                             1.1      2019-01-13 [2] CRAN (R 3.6.3)
    ##  assertthat                          0.2.1    2019-03-21 [2] CRAN (R 3.6.3)
    ##  backports                           1.1.5    2019-10-02 [2] CRAN (R 3.6.1)
    ##  base64enc                           0.1-3    2015-07-28 [2] CRAN (R 3.6.0)
    ##  bibtex                              0.4.2.2  2020-01-02 [2] CRAN (R 3.6.3)
    ##  Biobase                           * 2.46.0   2020-03-16 [2] Bioconductor
    ##  BiocFileCache                       1.10.2   2020-03-16 [2] Bioconductor
    ##  BiocGenerics                      * 0.32.0   2020-03-16 [2] Bioconductor
    ##  BiocManager                         1.30.10  2019-11-16 [2] CRAN (R 3.6.3)
    ##  BiocParallel                        1.20.1   2020-03-16 [2] Bioconductor
    ##  BiocStyle                         * 2.14.4   2020-03-16 [2] Bioconductor
    ##  biomaRt                             2.42.0   2020-03-16 [2] Bioconductor
    ##  Biostrings                          2.54.0   2020-03-16 [2] Bioconductor
    ##  biovizBase                          1.34.1   2020-03-17 [2] Bioconductor
    ##  bit                                 1.1-15.2 2020-02-10 [2] CRAN (R 3.6.2)
    ##  bit64                               0.9-7    2017-05-08 [2] CRAN (R 3.6.2)
    ##  bitops                              1.0-6    2013-08-17 [2] CRAN (R 3.6.0)
    ##  blob                                1.2.1    2020-01-20 [2] CRAN (R 3.6.3)
    ##  bookdown                            0.18     2020-03-05 [2] CRAN (R 3.6.3)
    ##  BSgenome                            1.54.0   2020-03-16 [2] Bioconductor
    ##  bumphunter                        * 1.28.0   2020-03-17 [2] Bioconductor
    ##  checkmate                           2.0.0    2020-02-06 [2] CRAN (R 3.6.3)
    ##  cli                                 2.0.2    2020-02-28 [2] CRAN (R 3.6.3)
    ##  cluster                             2.1.0    2019-06-19 [2] CRAN (R 3.6.3)
    ##  codetools                           0.2-16   2018-12-24 [2] CRAN (R 3.6.3)
    ##  colorspace                          1.4-1    2019-03-18 [2] CRAN (R 3.6.1)
    ##  crayon                              1.3.4    2017-09-16 [2] CRAN (R 3.6.3)
    ##  crosstalk                           1.1.0.1  2020-03-13 [2] CRAN (R 3.6.3)
    ##  curl                                4.3      2019-12-02 [2] CRAN (R 3.6.3)
    ##  data.table                          1.12.8   2019-12-09 [2] CRAN (R 3.6.3)
    ##  DBI                                 1.1.0    2019-12-15 [2] CRAN (R 3.6.3)
    ##  dbplyr                              1.4.2    2019-06-17 [2] CRAN (R 3.6.3)
    ##  DEFormats                           1.14.0   2020-03-16 [2] Bioconductor
    ##  DelayedArray                        0.12.2   2020-03-16 [2] Bioconductor
    ##  derfinder                         * 1.20.0   2020-03-17 [2] Bioconductor
    ##  derfinderHelper                     1.20.0   2020-03-16 [2] Bioconductor
    ##  derfinderPlot                     * 1.20.0   2020-03-17 [2] Bioconductor
    ##  DESeq2                              1.26.0   2020-03-16 [2] Bioconductor
    ##  dichromat                           2.0-0    2013-01-24 [2] CRAN (R 3.6.0)
    ##  digest                              0.6.25   2020-02-23 [2] CRAN (R 3.6.3)
    ##  doRNG                               1.8.2    2020-01-27 [2] CRAN (R 3.6.3)
    ##  dplyr                               0.8.5    2020-03-07 [2] CRAN (R 3.6.3)
    ##  DT                                * 0.12     2020-02-05 [2] CRAN (R 3.6.3)
    ##  edgeR                               3.28.1   2020-03-16 [2] Bioconductor
    ##  ensembldb                           2.10.2   2020-03-16 [2] Bioconductor
    ##  evaluate                            0.14     2019-05-28 [2] CRAN (R 3.6.3)
    ##  fansi                               0.4.1    2020-01-08 [2] CRAN (R 3.6.3)
    ##  farver                              2.0.3    2020-01-16 [2] CRAN (R 3.6.3)
    ##  foreach                           * 1.4.8    2020-02-09 [2] CRAN (R 3.6.3)
    ##  foreign                             0.8-76   2020-03-03 [2] CRAN (R 3.6.3)
    ##  Formula                             1.2-3    2018-05-03 [2] CRAN (R 3.6.0)
    ##  genefilter                          1.68.0   2020-03-16 [2] Bioconductor
    ##  geneplotter                         1.64.0   2020-03-16 [2] Bioconductor
    ##  GenomeInfoDb                      * 1.22.0   2020-03-16 [2] Bioconductor
    ##  GenomeInfoDbData                    1.2.2    2020-03-05 [2] Bioconductor
    ##  GenomicAlignments                   1.22.1   2020-03-16 [2] Bioconductor
    ##  GenomicFeatures                   * 1.38.2   2020-03-16 [2] Bioconductor
    ##  GenomicFiles                        1.22.0   2020-03-17 [2] Bioconductor
    ##  GenomicRanges                     * 1.38.0   2020-03-16 [2] Bioconductor
    ##  GGally                              1.4.0    2018-05-17 [2] CRAN (R 3.6.3)
    ##  ggbio                             * 1.34.0   2020-03-17 [2] Bioconductor
    ##  ggplot2                           * 3.3.0    2020-03-05 [2] CRAN (R 3.6.3)
    ##  glue                                1.3.2    2020-03-12 [2] CRAN (R 3.6.3)
    ##  graph                               1.64.0   2020-03-16 [2] Bioconductor
    ##  gridExtra                         * 2.3      2017-09-09 [2] CRAN (R 3.6.3)
    ##  gtable                              0.3.0    2019-03-25 [2] CRAN (R 3.6.3)
    ##  highr                               0.8      2019-03-20 [2] CRAN (R 3.6.3)
    ##  Hmisc                               4.3-1    2020-02-07 [2] CRAN (R 3.6.3)
    ##  hms                                 0.5.3    2020-01-08 [2] CRAN (R 3.6.3)
    ##  htmlTable                           1.13.3   2019-12-04 [2] CRAN (R 3.6.3)
    ##  htmltools                           0.4.0    2019-10-04 [2] CRAN (R 3.6.3)
    ##  htmlwidgets                         1.5.1    2019-10-08 [2] CRAN (R 3.6.3)
    ##  httr                                1.4.1    2019-08-05 [2] CRAN (R 3.6.3)
    ##  IRanges                           * 2.20.2   2020-03-16 [2] Bioconductor
    ##  iterators                         * 1.0.12   2019-07-26 [2] CRAN (R 3.6.3)
    ##  jpeg                                0.1-8.1  2019-10-24 [2] CRAN (R 3.6.1)
    ##  jsonlite                            1.6.1    2020-02-02 [2] CRAN (R 3.6.3)
    ##  knitcitations                       1.0.10   2019-09-15 [2] CRAN (R 3.6.3)
    ##  knitr                             * 1.28     2020-02-06 [2] CRAN (R 3.6.3)
    ##  knitrBootstrap                      1.0.2    2018-05-24 [2] CRAN (R 3.6.3)
    ##  labeling                            0.3      2014-08-23 [2] CRAN (R 3.6.0)
    ##  lattice                             0.20-40  2020-02-19 [2] CRAN (R 3.6.3)
    ##  latticeExtra                        0.6-29   2019-12-19 [2] CRAN (R 3.6.3)
    ##  lazyeval                            0.2.2    2019-03-15 [2] CRAN (R 3.6.3)
    ##  lifecycle                           0.2.0    2020-03-06 [2] CRAN (R 3.6.3)
    ##  limma                               3.42.2   2020-03-16 [2] Bioconductor
    ##  locfit                            * 1.5-9.1  2013-04-20 [2] CRAN (R 3.6.3)
    ##  lubridate                           1.7.4    2018-04-11 [2] CRAN (R 3.6.3)
    ##  magick                              2.3      2020-01-24 [2] CRAN (R 3.6.3)
    ##  magrittr                            1.5      2014-11-22 [2] CRAN (R 3.6.3)
    ##  markdown                            1.1      2019-08-07 [2] CRAN (R 3.6.3)
    ##  Matrix                              1.2-18   2019-11-27 [2] CRAN (R 3.6.3)
    ##  matrixStats                         0.56.0   2020-03-13 [2] CRAN (R 3.6.3)
    ##  memoise                             1.1.0    2017-04-21 [2] CRAN (R 3.6.3)
    ##  mgcv                              * 1.8-31   2019-11-09 [2] CRAN (R 3.6.3)
    ##  munsell                             0.5.0    2018-06-12 [2] CRAN (R 3.6.3)
    ##  nlme                              * 3.1-145  2020-03-04 [2] CRAN (R 3.6.3)
    ##  nnet                                7.3-13   2020-02-25 [2] CRAN (R 3.6.3)
    ##  openssl                             1.4.1    2019-07-18 [2] CRAN (R 3.6.3)
    ##  org.Hs.eg.db                      * 3.10.0   2020-03-06 [2] Bioconductor
    ##  OrganismDbi                         1.28.0   2020-03-16 [2] Bioconductor
    ##  pillar                              1.4.3    2019-12-20 [2] CRAN (R 3.6.3)
    ##  pkgconfig                           2.0.3    2019-09-22 [2] CRAN (R 3.6.3)
    ##  plyr                                1.8.6    2020-03-03 [2] CRAN (R 3.6.3)
    ##  png                                 0.1-7    2013-12-03 [2] CRAN (R 3.6.0)
    ##  prettyunits                         1.1.1    2020-01-24 [2] CRAN (R 3.6.3)
    ##  progress                            1.2.2    2019-05-16 [2] CRAN (R 3.6.3)
    ##  ProtGenerics                        1.18.0   2020-03-16 [2] Bioconductor
    ##  purrr                               0.3.3    2019-10-18 [2] CRAN (R 3.6.3)
    ##  qvalue                              2.18.0   2020-03-16 [2] Bioconductor
    ##  R6                                  2.4.1    2019-11-12 [2] CRAN (R 3.6.3)
    ##  rappdirs                            0.3.1    2016-03-28 [2] CRAN (R 3.6.3)
    ##  RBGL                                1.62.1   2020-03-16 [2] Bioconductor
    ##  RColorBrewer                      * 1.1-2    2014-12-07 [2] CRAN (R 3.6.0)
    ##  Rcpp                                1.0.3    2019-11-08 [2] CRAN (R 3.6.3)
    ##  RCurl                               1.98-1.1 2020-01-19 [2] CRAN (R 3.6.2)
    ##  RefManageR                          1.2.12   2019-04-03 [2] CRAN (R 3.6.3)
    ##  regionReport                      * 1.20.1   2020-03-16 [1] Bioconductor
    ##  reshape                             0.8.8    2018-10-23 [2] CRAN (R 3.6.3)
    ##  reshape2                            1.4.3    2017-12-11 [2] CRAN (R 3.6.3)
    ##  rlang                               0.4.5    2020-03-01 [2] CRAN (R 3.6.3)
    ##  rmarkdown                           2.1      2020-01-20 [2] CRAN (R 3.6.3)
    ##  rngtools                            1.5      2020-01-23 [2] CRAN (R 3.6.3)
    ##  rpart                               4.1-15   2019-04-12 [2] CRAN (R 3.6.3)
    ##  Rsamtools                           2.2.3    2020-03-16 [2] Bioconductor
    ##  RSQLite                             2.2.0    2020-01-07 [2] CRAN (R 3.6.3)
    ##  rstudioapi                          0.11     2020-02-07 [2] CRAN (R 3.6.3)
    ##  rtracklayer                         1.46.0   2020-03-16 [2] Bioconductor
    ##  S4Vectors                         * 0.24.3   2020-03-16 [2] Bioconductor
    ##  scales                              1.1.0    2019-11-18 [2] CRAN (R 3.6.3)
    ##  sessioninfo                       * 1.1.1    2018-11-05 [2] CRAN (R 3.6.3)
    ##  stringi                             1.4.6    2020-02-17 [2] CRAN (R 3.6.2)
    ##  stringr                             1.4.0    2019-02-10 [2] CRAN (R 3.6.3)
    ##  SummarizedExperiment                1.16.1   2020-03-16 [2] Bioconductor
    ##  survival                            3.1-11   2020-03-07 [2] CRAN (R 3.6.3)
    ##  tibble                              2.1.3    2019-06-06 [2] CRAN (R 3.6.2)
    ##  tidyselect                          1.0.0    2020-01-27 [2] CRAN (R 3.6.3)
    ##  TxDb.Hsapiens.UCSC.hg19.knownGene * 3.2.2    2020-03-06 [2] Bioconductor
    ##  VariantAnnotation                   1.32.0   2020-03-16 [2] Bioconductor
    ##  vctrs                               0.2.4    2020-03-10 [2] CRAN (R 3.6.3)
    ##  whisker                           * 0.4      2019-08-28 [2] CRAN (R 3.6.3)
    ##  withr                               2.1.2    2018-03-15 [2] CRAN (R 3.6.3)
    ##  xfun                                0.12     2020-01-13 [2] CRAN (R 3.6.3)
    ##  XML                                 3.99-0.3 2020-01-20 [2] CRAN (R 3.6.2)
    ##  xml2                                1.2.5    2020-03-11 [2] CRAN (R 3.6.3)
    ##  xtable                              1.8-4    2019-04-21 [2] CRAN (R 3.6.3)
    ##  XVector                             0.26.0   2020-03-16 [2] Bioconductor
    ##  yaml                                2.2.1    2020-02-01 [2] CRAN (R 3.6.2)
    ##  zlibbioc                            1.32.0   2020-03-16 [2] Bioconductor
    ##
    ## [1] C:/Users/biocbuild/bbs-3.10-bioc/tmpdir/RtmpwRnpDS/Rinst1bcc57d72a99
    ## [2] C:/Users/biocbuild/bbs-3.10-bioc/R/library

Pandoc version used: 2.1.

# 7 Bibliography

This report was created with `regionReport` (Collado-Torres, Jaffe, and Leek, 2016) using `rmarkdown` (Allaire, Xie, McPherson, Luraschi, et al., 2020) while `knitr` (Xie, 2014) and `DT` (Xie, Cheng, and Tan, 2020) were running behind the scenes. `whisker` (de Jonge, 2019) was used for creating templates for the `pvalueVars` and `densityVars`.

Citations made with `knitcitations` (Boettiger, 2019). The BibTeX file can be found here.

[1] J. Allaire, Y. Xie, J. McPherson, J. Luraschi, et al. rmarkdown: Dynamic Documents for R. R package version 2.1. 2020. <URL: https://github.com/rstudio/rmarkdown>.

[2] C. Boettiger. knitcitations: Citations for ‘Knitr’ Markdown Files. R package version 1.0.10. 2019. <URL: https://CRAN.R-project.org/package=knitcitations>.

[3] L. Collado-Torres, A. E. Jaffe, and J. T. Leek. derfinderPlot: Plotting functions for derfinder. https://github.com/leekgroup/derfinderPlot - R package version 1.20.0. 2017. DOI: 10.18129/B9.bioc.derfinderPlot. <URL: http://www.bioconductor.org/packages/derfinderPlot>.

[4] L. Collado-Torres, A. E. Jaffe, and J. T. Leek. “regionReport: Interactive reports for region-level and feature-level genomic analyses [version2; referees: 2 approved, 1 approved with reservations]”. In: F1000Research 4 (2016), p. 105. DOI: 10.12688/f1000research.6379.2. <URL: http://f1000research.com/articles/4-105/v2>.

[5] L. Collado-Torres, A. Nellore, A. C. Frazee, C. Wilks, et al. “Flexible expressed region analysis for RNA-seq with derfinder”. In: Nucl. Acids Res. (2017). DOI: 10.1093/nar/gkw852. <URL: http://nar.oxfordjournals.org/content/early/2016/09/29/nar.gkw852>.

[6] A. E. Jaffe, P. Murakami, H. Lee, J. T. Leek, et al. “Bump hunting to identify differentially methylated regions in epigenetic epidemiology studies”. In: International journal of epidemiology 41.1 (2012), pp. 200-209. DOI: 10.1093/ije/dyr238.

[7] H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016. ISBN: 978-3-319-24277-4. <URL: https://ggplot2.tidyverse.org>.

[8] Y. Xie. “knitr: A Comprehensive Tool for Reproducible Research in R”. In: Implementing Reproducible Computational Research. Ed. by V. Stodden, F. Leisch and R. D. Peng. ISBN 978-1466561595. Chapman and Hall/CRC, 2014. <URL: http://www.crcpress.com/product/isbn/9781466561595>.

[9] Y. Xie, J. Cheng, and X. Tan. DT: A Wrapper of the JavaScript Library ‘DataTables’. R package version 0.12. 2020. <URL: https://CRAN.R-project.org/package=DT>.

[10] T. Yin, D. Cook, and M. Lawrence. “ggbio: an R package for extending the grammar of graphics for genomic data”. In: Genome Biology 13.8 (2012), p. R77.

[11] E. de Jonge. whisker: mustache for R, Logicless Templating. R package version 0.4. 2019. <URL: https://CRAN.R-project.org/package=whisker>.