rotate3d | R Documentation |
Rotate to the direction of interest in spherical coordinates by contrasts (e.g. 1, -1, -1).
rotate3d(T, contrast)
T |
a numeric matrix (normally z-score converted) with 3 columns. The rows are genes or phosphorylation sites and the columns are treatments vs control statistics. |
contrast |
the direction to be tested for enrichment. Specified as contrast in a triplet (see example). |
A rotated matrix with respect to the direction of interest.
# load the example data
data(PM)
# convert statistics into z-scores
PM.zscores <- apply(PM, 2, function(x){qnorm(rank(x)/(nrow(PM)+1))})
# Rotate the matrix by contrast 1, -1, -1 (i.e. up-regulation, down-regulation, dow-regulation).
PM.rotated <- rotate3d(PM.zscores, contrast = c(1, -1, -1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.