M3D_Single: Computes the components of the M3D test-statistic over one region for 2
samples
Description
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. This is not intended to be called directly
by the user.
Contains the methylation data over two samples for a given
region.
locMx
The matrix of distances between the CpG sites.
locInds
The indices of the non-zero entries of locMx.
method
This specifies whether to return the full MMD and the
methylation blind MMD (focusing only on the coverage)
or just the former. if method ='MinusCovMMD' it is both, all other values
return just the full MMD.
Value
This returns the value of the MMD for the region between the two
samples as a numeric. If method
is set to 'MinusCovMMD', a list is returned of the full MMD and the coverage
only MMD. Subtracting them gives the M3D test-statistic.
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).