Aggregate differentially methylated region (DMR) windows by gene annotation.

summariseDMRsByGene(DMRtable)

Arguments

DMRtable

data.frame or GRanges Annotated DMRs. Must include the columns ENSEMBL, SYMBOL, and GENENAME (typically added with annotateWindows()).

Value

A tibble:

  • summariseDMRsByGene(): returns one row per gene, with counts of associated DMRs and any aggregated metadata.

Examples

data(exampleTumourNormal, package = "mesa")

# Summarise DMRs with explicit annotation databases
if (requireNamespace("TxDb.Hsapiens.UCSC.hg38.knownGene", quietly = TRUE) &&
    requireNamespace("org.Hs.eg.db", quietly = TRUE)) {
    exampleTumourNormal %>%
        calculateDMRs(variable = "tumour", contrasts = "all") %>%
        annotateWindows(
            TxDb = "TxDb.Hsapiens.UCSC.hg38.knownGene",
            annoDb = "org.Hs.eg.db"
        ) %>%
        summariseDMRsByGene()
}
#> Calculating 1 possible contrasts on the tumour column.
#> Generating table of nrpm values for 819 regions across 10 samples.
#> Fitting initial GLM on 309 windows, without using parallelisation.
#> Performing contrast Normal_vs_Tumour
#> Contrasts Complete
#> selecting regions from contrast Normal_vs_Tumour
#> selected 23/309 windows
#> adding test results from Normal_vs_Tumour
#> >> Using Genome: hg38 ...
#> >> Using Genome: hg38 ...
#> >> Using Genome: hg38 ...
#> 'select()' returned 1:1 mapping between keys and columns
#> # A tibble: 8 × 4
#>   ENSEMBL         SYMBOL       GENENAME                                        n
#>   <chr>           <chr>        <chr>                                       <int>
#> 1 ENSG00000233429 HOTAIRM1     HOXA transcript antisense RNA, myeloid-spe…     5
#> 2 NA              HOTTIP       HOXA distal transcript antisense RNA            5
#> 3 ENSG00000240990 HOXA11-AS    HOXA11 antisense RNA                            3
#> 4 ENSG00000253405 EVX1-AS      EVX1 antisense RNA                              3
#> 5 ENSG00000106038 EVX1         even-skipped homeobox 1                         2
#> 6 ENSG00000122592 HOXA7        homeobox A7                                     2
#> 7 ENSG00000254369 HOXA-AS3     HOXA cluster antisense RNA 3                    2
#> 8 ENSG00000257184 HOXA10-HOXA9 HOXA10-HOXA9 readthrough                        1