rotate3d {directPA} | R Documentation |
Spherical Coordinates Rotation
Description
Rotate to the direction of interest in spherical coordinates by contrasts (e.g. 1, -1, -1).
Usage
rotate3d(T, contrast)
Arguments
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). |
Value
A rotated matrix with respect to the direction of interest.
Examples
# 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))
[Package directPA version 1.5.1 Index]