filter_methy: Create filtered methylation file

View source: R/filter_methy.R

filter_methyR Documentation

Create filtered methylation file

Description

Create a filtered methylation file from an existing one.

Usage

filter_methy(x, output_file, ...)

Arguments

x

the path to the methylation file or a NanoMethResult object.

output_file

the output file to write results to (must end in .bgz).

...

filtering criteria given in dplyr syntax. Use methy_col_names() to get available column names.

Value

invisibly returns 'output_file' if x is a file path, otherwise returns NanoMethResult object with methy(x) replaced with filtered value.

Examples

nmr <- load_example_nanomethresult()
output_file <- paste0(tempfile(), ".tsv.bgz")
filter_methy(nmr, output_file = output_file, chr == "chrX")
filter_methy(methy(nmr), output_file = output_file, chr == "chrX")

Shians/NanoMethViz documentation built on Oct. 11, 2024, 7:17 a.m.