Last data update: 2014.03.03

R: Computes the components of the M3D test-statistic over all...
M3D_ParaR Documentation

Computes the components of the M3D test-statistic over all regions for all sample-pairs.

Description

Parallel implementation of M3D_Wrapper function. Returns the two components of the M3D test-statistic - the MMD (Gretton et al. 2006) for the full data and the coverge only data, respectively - for all regions and all samples pairs, as a matrix.

Usage

M3D_Para(rrbs, CpGs, overlaps, num.cores = NaN)

Arguments

rrbs

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

CpGs

A GRanges object detailing the testing regions.

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.

num.cores

Integer giving the number or cores to use. Defaults to the maximum available

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

data(rrbsDemo)
data(CpGsDemo)
M3D_list <- M3D_Para(rrbsDemo,CpGsDemo)
head(M3d_list$Full-M3D_list$Coverage)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(M3D)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/M3D/M3D_Para.Rd_%03d_medium.png", width=480, height=480)
> ### Name: M3D_Para
> ### Title: Computes the components of the M3D test-statistic over all
> ###   regions for all sample-pairs.
> ### Aliases: M3D_Para
> 
> ### ** Examples
> 
> ## No test: 
> data(rrbsDemo)
> data(CpGsDemo)
> M3D_list <- M3D_Para(rrbsDemo,CpGsDemo)
Error in M3D_Para(rrbsDemo, CpGsDemo) : 
  could not find function "detectCores"
Execution halted