compDists: Compute distances between Peaks

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/compDists.R

Description

This function computes pairwise distances between histograms according to the dist.method (MMD, KS). For large data sets it is a bit time consuming.

Usage

1
compDists(MD, dist.method = "MMD", sigma = NULL, run.parallel = TRUE)

Arguments

MD

DBAmmd Object. This Object can be created using DBAmmd().

dist.method

specify method used for distances between samples. Currently only Maximum Mean Discrepancy (MMD) and Kolmogorov-Smirnov (KS) implemented. (DEFAULT: 'MMD')

sigma

sigma parameter of the RBF kernel, determining the distance (along the genome) at which fragment counts decorrelate. If set to NULL, 100 random Peaks are used to determine sigma heuristically according to the method described in the MMDiff paper [1]. (DEFUALT: NULL)

run.parallel

whether to run in parallel (currently no parallelization implemented) (DEFAULT: FALSE)

Value

DBAmmd object with updated slot Dists

Author(s)

Gabriele Schweikert G.Schweikert@ed.ac.uk

References

[1] Schweikert et al. BMC Genomics 2013 ...

See Also

DBAmmd, plotDists, plotDISTS4Peak, compPvals

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Example using a small data set provided with this package:

data("MMD")
MMD.1 <- compDists(MMD)

# To inspect the computed distances:
D <- Dists(MMD.1,dist.method='MMD')
head(D)

# To analyse the result:
plotDists(MMD.1)

MMDiff2 documentation built on Nov. 8, 2020, 11:03 p.m.