Last chance! 50% off unlimited learning
Sale ends in
assoScore(pheno, metric="cosine", upperTri=TRUE, transform=TRUE,
verbose=TRUE, ...)
TRUE
) to take the upper
triangular of the similarity matrix or not (if FALSE
).
TRUE
) the range of
association scores from [-1, 1]
to [0, 1]
or not (if FALSE
).
TRUE
) or off if FALSE
detailed
run-time message.
cor
upperTri=TRUE
) or a matrix
(if upperTri=FALSE
) of association scores for given phenotypes.
cor
are allowed.
cor
, cosineSim
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")
Run the code above in your browser using DataLab