tabulateEpibed: Tabulate to a read or fragment level matrix for CGH or GCH...

View source: R/tabulateEpibed.R

tabulateEpibedR Documentation

Tabulate to a read or fragment level matrix for CGH or GCH context methylation.

Description

The input for this function is the GRanges output from biscuiteer::readEpibed(). It will auto-detect whether this a BS-seq or a NOMe-seq run and tabulate accordingly.

Usage

tabulateEpibed(
  gr,
  region = NULL,
  include_empty_reads = FALSE,
  include_snps = TRUE,
  merge_cg_vr = TRUE
)

Arguments

gr

The epibed GRanges object from readEpibed()

region

Either a GRanges of regions to subset to or explicit region (e.g., chr6:1555-1900)

include_empty_reads

Whether to include reads that contain no methylated (or SNP) sites (default: FALSE)

include_snps

Whether to include SNPs or not, only matters for epiBEDs from BISCUIT v1.0 or 1.1 (default: TRUE)

merge_cg_vr

Whether to create a table with the CpG and SNP tables merged (default: TRUE)

Value

A matrix or list of matrices

Examples


epibed.nome <- system.file("extdata", "hct116.nome.epibed.gz",
                           package="biscuiteer")
epibed.nome.gr <- readEpibed(epibed = epibed.nome,
                             genome = "hg19", chr = "chr1")
epibed.tab.nome <- tabulateEpibed(epibed.nome.gr)


huishenlab/bisplotti documentation built on Sept. 20, 2023, 10:13 p.m.