assoScore: Association scores for gene pairs

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

View source: R/assoScore.R

Description

This function compute similarity scores to quantify associations between pairs of genes, given measured rich phenotypes.

Usage

1
2
assoScore(pheno, metric="cosine", upperTri=TRUE, transform=TRUE,
verbose=TRUE, ...) 

Arguments

pheno

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

metric

a character value specifying the metric to compute similarity scores. Currently, 'cosine' and 'correlation' are supported (see details for more).

upperTri

a logical value specifying whether (if TRUE) to take the upper triangular of the similarity matrix or not (if FALSE).

transform

a logical value specifying whether to transform (if TRUE) the range of association scores from [-1, 1] to [0, 1] or not (if FALSE).

verbose

a logical value to switch on (if TRUE) or off if FALSE detailed run-time message.

...

other arguments for function cor

Details

This function aims at quantifying the associations between genes of interest given certain phenotyping measurements (e.g. gene expressions by microarray, cell viabilities, morphological phenotypes, etc.). For the current version of the package, the user can either choose 'cosine' or 'correlation'. When the latter is chosen, additional arguments (e.g. 'method') for the function cor are allowed.

Value

This function will return either a vector (if upperTri=TRUE) or a matrix (if upperTri=FALSE) of association scores for given phenotypes.

Author(s)

Xin Wang xw264@cam.ac.uk

References

Xin Wang, Roland F. Schwarz, 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

cor, cosineSim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
toydata<-matrix(rnorm(n=2000, mean=0, sd=4), nrow=100, ncol=20)
toyasso<-assoScore(t(toydata), "cosine", upperTri=FALSE, transform=FALSE)
##transform to [0, 1]
toyasso01<-assoScore(t(toydata), "cosine", upperTri=FALSE, transform=TRUE)
##transform to [0, 1] and return only the upper triangular
toyasso01upper<-assoScore(t(toydata), "cosine", upperTri=TRUE, transform=
TRUE)
##use spearman correlation
toyassoSp<-assoScore(t(toydata), "correlation", upperTri=FALSE, transform=
FALSE, method="spearman")

PANR documentation built on Nov. 8, 2020, 8:15 p.m.