getSampleDistance {chromVAR} | R Documentation

## getSampleDistance

### Description

Get distance between samples based on bias corrected deviations

### Usage

    getSampleDistance(object, threshold = 1.5, initial_dims = 50,
      distance_function = dist)

### Arguments

`object` | deviations result
`threshold` | threshold for variability
`initial_dims` | initial dimentions for preliminary dimensionality reduction via pca
`distance_function` | distance function to use

### Details

This function will compute the distance between samples based on the normalized deviations. It will first remove correlated motifs / peak sets. Then the dimensionality will be further reduced via PCA if the number of dimensions exceeds initial_dims. Then the supplied distance_function will be used.

### Value

dist object for distance between samples

### Author(s)

Alicia Schep

### See Also

`getSampleCorrelation`

### Examples

    # Load very small example results from computeDeviations
    data(mini_dev, package = "chromVAR")
    sample_dist <- getSampleDistance(mini_dev, threshold = 0.8)
    # setting very low variabilitiy threshold because this is mini data set
    # threshold should generally be above 1
    # Use plotVariability to get a sense of an appropriate threshold
    # As this is mini data set, results  not meaningful!

[Package chromVAR version 1.16.0 Index]