write_bedgraphs: Writes bedGraphs from methrix object

View source: R/write_bedgraphs.R

write_bedgraphsR Documentation

Writes bedGraphs from methrix object

Description

Writes bedGraphs from methrix object

Usage

write_bedgraphs(
  m,
  output_dir = NULL,
  rm_NA = TRUE,
  force = FALSE,
  n_thr = 4,
  compress = TRUE,
  SeqStyle = "UCSC",
  multiBed = NULL,
  metilene = FALSE,
  phenoCol = NULL,
  add_coverage = FALSE
)

Arguments

m

methrix object

output_dir

Output directory name where the files should be saved. If NULL creats a tempdir

rm_NA

remove NAs

force

forces to create files if they are existing

n_thr

Default 4.

compress

Whether to compress the output. Default TRUE

SeqStyle

Default 'UCSC' with 'chr' prefix.

multiBed

Default NULL. If provided a filename, a single bedGraph file with all samples included is generated.

metilene

Default FALSE. If TRUE outputs bedgraphs in 'metilene' format that can be directly used for DMR calling with 'metilene'. This option works only when multiBed = TRUE.

phenoCol

Default NULL. 'condition' column from colData. Only applicable if metilene = TRUE

add_coverage

Should the output file contain information on coverage? Default FALSE

Value

writes bedgraph files to output

Examples

data('methrix_data')
write_bedgraphs(m = methrix_data, output_dir = './temp')
#Export to metline format for DMR calling with metline
write_bedgraphs(m = methrix_data, output_dir = "./temp", rm_NA = FALSE,
metilene = TRUE,multiBed = "metline_ip", phenoCol = "Condition")

CompEpigen/methrix documentation built on July 24, 2024, 5:49 p.m.