cosineSim {PANR} | R Documentation

## Compute cosine similarities or distances between pairs of genes

### Description

This function compute cosine similarities or distances between pairs of genes, given measured rich phenotypes.

### Usage

    cosineSim(x)
    cosineDist(x)

### Arguments

`x` | a numeric matrix of rich phenotypes with rows and columns specifying samples and genes, respectively.

### Value

This function will return either a numeric matrix of cosine similarities or an object of `dist`.

### Author(s)

Xin Wang xw264@cam.ac.uk

### References

Xin Wang, Mauro Castro, Klaas W. Mulder and Florian Markowetz, Posterior association networks and enriched functional gene modules inferred from rich phenotypic perturbation screens, in preparation.

### See Also

PANR:`assoScore`

### Examples

    toydata<-matrix(rnorm(n=2000, mean=0, sd=4), nrow=100, ncol=20)
    toycossim<-cosineSim(t(toydata))
    toycosdist<-cosineDist(t(toydata))

[Package PANR version 1.32.0 Index]