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
2
compDists(MD, dist.method = "MMD", sigma = NULL, CompIDs = NULL,
  strand.specific = FALSE, run.parallel = FALSE, BPPARAM = bpparam())

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)

CompIDs

(2 x C) Matrix specifying for pairs of Sample IDs for which distances should be computed. If NULL all pairwise distances will be computed. (DEFAULT: NULL)

strand.specific

if strand specific reads should be kept apart. (DEFAULT:FALSE)

run.parallel

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

BPPARAM

an optional parameter object passed internally to bplapply when parallel=TRUE. If not specified, the parameters last registered with register will be used.

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)

dhelekal/mmdiff3 documentation built on July 25, 2019, 8:18 p.m.