Learn R Programming

PANR (version 1.18.0)

cosineSim: 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.

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

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

Run the code above in your browser using DataLab