read_methylation_report: Read a methylation report file

Description Usage Arguments Value Author(s) Examples

View source: R/read_data.R

Description

read_methylation_report read a file containing methylation information using readr. In general, the metyylation report file was generated by Bismark methylation extractor. The methylation report file format is the following: <chromosome> <position> <strand> <count methylated> <count unmethylated> <C-context> <trinucleotide context> Note: the 7th column is optional.

Usage

1
read_methylation_report(file, min_coverage = 4, type = "CG")

Arguments

file

the path of methylation report file

min_coverage

filter out the sites which total reads < min_coverage. the default is 4.

type

specify the methylation context type : "CG", "CHG" or "CHH",the default is "CG".

Value

A GRanges object. The GRanges object contains three additional metadata columns:

Author(s)

Hongen Kang geneprophet@163.com

Examples

1
2
3
4
5
6
7
8
# Obtain the path to files
## Not run: 
#' file <- system.file("extdata", "example_human_chr22_CpG_report.txt", package = "BSDMR")
human_met <- read_methylation_report(file,min_coverage=4)
file <- system.file("extdata", "example_mouse_chr15_CpG_report.txt", package = "BSDMR")
mouse_met <- read_methylation_report(file,min_coverage=4)

## End(Not run)

geneprophet/BSDMR documentation built on March 3, 2021, 5:50 a.m.