Count the number of up- and down-regulated DMR windows per contrast. Internally, results are reshaped to long format before summarisation.
summariseDMRsByContrast(
DMRtable,
FDRthres = 0.05,
log2FCthres = 0,
deltaBetaThres = 0
)data.frame or GRanges
DMR results, typically returned by calculateDMRs(). If in wide format, it
will be converted with pivotDMRsLonger().
numeric(1)
False discovery rate threshold for significance.
Default: 0.05.
numeric(1)
Absolute log2 fold-change threshold for calling up/down regulation.
Default: 0.
numeric(1)
Absolute delta-beta threshold for calling up/down regulation.
Default: 0.
A tibble:
summariseDMRsByContrast(): returns one row per contrast, with
counts of up-regulated (nUp) and down-regulated (nDown) DMRs that pass
the specified thresholds.
pivotDMRsLonger(), summariseDMRsByGene()
Other DMR-helpers:
pivotDMRsLonger(),
summariseDMRsByGene(),
writeDMRsToBed(),
writeDMRsToExcel()
data(exampleTumourNormal, package = "mesa")
# Summarise DMRs for a single contrast, using custom FDR threshold
exampleTumourNormal %>%
calculateDMRs(
variable = "type",
contrasts = "LUAD_vs_NormalLung",
FDRthres = 0.1
) %>%
summariseDMRsByContrast(FDRthres = 0.1)
#> Generating table of nrpm values for 819 regions across 5 samples.
#> Fitting initial GLM on 255 windows, without using parallelisation.
#> Performing contrast LUAD_vs_NormalLung
#> Contrasts Complete
#> selecting regions from contrast LUAD_vs_NormalLung
#> selected 58/255 windows
#> adding test results from LUAD_vs_NormalLung
#> # A tibble: 1 × 4
#> group1 group2 nUp nDown
#> <chr> <chr> <int> <int>
#> 1 LUAD NormalLung 56 2