summarizeBsSeqOver: Summarize methylation over provided regions

Description Usage Arguments Value Examples

View source: R/summarizeBsSeqOver.R

Description

Used for bsseq objects. Mostly a local wrapp for getMeth.

Usage

1
summarizeBsSeqOver(bsseq, segs, dropNA = FALSE, impute = FALSE)

Arguments

bsseq

The bsseq object to summarize

segs

Regions to summarize over (GRanges object, no GRangesList yet)

dropNA

Whether to drop rows if more than half of samples are NA (DEFAULT: FALSE)

impute

Whether to impute NAs/NaNs (DEFAULT: FALSE)

Value

1
   A matrix of regional methylation fractions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  orig_bed <- system.file("extdata", "MCF7_Cunha_chr11p15.bed.gz",
                          package="biscuiteer")
  orig_vcf <- system.file("extdata", "MCF7_Cunha_header_only.vcf.gz",
                          package="biscuiteer")
  bisc <- readBiscuit(BEDfile = orig_bed, VCFfile = orig_vcf,
                      merged = FALSE)

  reg <- GRanges(seqnames = rep("chr11",5),
                 strand = rep("*",5),
                 ranges = IRanges(start = c(0,2.8e6,1.17e7,1.38e7,1.69e7),
                                  end= c(2.8e6,1.17e7,1.38e7,1.69e7,2.2e7))
                )
  summary <- summarizeBsSeqOver(bsseq = bisc, segs = reg, dropNA = TRUE)

biscuiteer documentation built on Nov. 8, 2020, 8:28 p.m.