M3D_Wrapper_lite: Computes the components of the M3D test-statistic over all...

Description Usage Arguments Value Author(s) References Examples

View source: R/M3D_Wrapper_lite.R

Description

Returns the M3D test-statistic, without the compenents, for all regions with the cross group sample pairs averaged to save memory (in column one), as a matrix.

Usage

1
2
M3D_Wrapper_lite(rrbs, overlaps, group1 = NaN, group2 = NaN,
  verbose = TRUE)

Arguments

rrbs

An rrbs object containing methylation and coverage data as created using the BiSeq pacakge

overlaps

The overlaps between the list of testing regions and the methylation data. This is obtained using the function findOverlaps(CpGs,rrbs) for a GRanges object CpGs detailing the testing regions.

group1

The name of the first group for the comparison. This is stored in colData(rrbs). Default finds first unique group in colData(rrbs).

group2

The name of the second group for the comparison. This is stored in colData(rrbs). Default finds second unique group in colData(rrbs).

verbose

Logical vector. If true, the function prints a progress bar.

Value

This returns the two components of the M3D test-statistic for each region over all sample pairs as a matrix. Subtracting them gives the M3D test-statistic. This is processed with the function pvals.

Author(s)

Tom Mayo t.mayo@ed.ac.uk

References

Gretton, A., Borgwardt, K. M., Rasch, M., Scholkopf, B., Smola, A. J. (2006). A kernel method for the two-sample-problem. In Advances in neural information processing systems (pp. 513-520).

Examples

1
2
3
4
5
6
data(rrbsDemo)
data(CpGsDemo)
CpGsDemo <- CpGsDemo[1:5]
overlaps <- GenomicRanges::findOverlaps(CpGsDemo,rrbsDemo)
M3D_list <- M3D_Wrapper_lite(rrbsDemo,overlaps)
head(M3D_list)

M3D documentation built on April 29, 2020, 5:59 a.m.