write_dmr: Generate files from a set of DMR

View source: R/write_dmr.R

write_dmrR Documentation

Generate files from a set of DMR

Description

For a quick visualization using a genome browser like IGV, this function generates [BED](https://bit.ly/1hdVNjA) and [SEG](https://bit.ly/2J2WZdZ) files of statistically significant hyper-methylated and hypo-methylated DMRs.

Usage

write_dmr(dmr_table, path, qvalue_thr = 0.05)

Arguments

dmr_table

A data.frame generated by [find_dmrs].

path

A string including absolute or relative path which prefixes are added to ("_hyper.bed", "_hypo.bed", ".seg")

qvalue_thr

A numerical threshold. Report only DMRs with a fdr lower than threshold.

Details

BED files (hyper- and hypo-methylated DMRs separately) report genomic location and fdr (in form of -log10(q)). SEG files report average beta differences between tumor and normal/control samples at each DMR.

NOTE: BED files have 0-based coordinates while SEG files have 1-based coordinates.

Value

Nothing. Only saves output tables.

Examples

## Not run: 
auc <- compute_AUC(tumor_example, control_example)
dmr_set <- find_dmrs(tumor_example, control_example, auc, reference_example, min_sites = 10)
compute_z_scores(tumor_example, control_example, dmr_set,reference_example)
write_dmr(dmr_set, "dmr_set")

## End(Not run)

cgplab/ROCkerMeth documentation built on March 27, 2022, 9:57 p.m.