Export differentially methylated region (DMR) results to a set of BED files, with one file generated per contrast.

writeDMRsToBed(dataTable, folder, FDRthres = 0.05)

Arguments

dataTable

data.frame DMR results, typically returned by calculateDMRs(). If a GRanges, it will be coerced to a data frame internally.

folder

character(1) Directory in which to write BED files. Must exist and be writable.

FDRthres

numeric(1) False discovery rate threshold used to filter DMRs before writing. Default: 0.05.

Value

(Invisibly) returns the input object:

  • writeDMRsToBed(): returns dataTable (invisibly), enabling use in a pipeline.

Examples

data(exampleDMRs, package = "mesa")

# Export a set of bed files, one per contrast in the object
exampleDMRs %>%
    writeDMRsToBed(folder = tempdir(), FDRthres = 0.1)