index {ctsGE} | R Documentation |
Takes a numeric vector and return an expression index (i.e., a sequence of 1,-1, and 0)
index(x, cutoff)
x |
A numeric |
cutoff |
A numeric, dermine the threshold for indexing |
The function defines limits around the center (median or mean), +/- cutoff value in median absolute deviation (MAD) or standard deviation (SD) units respectively.The user defines a parameter cutoff that determines the limits around the gene-expression center. Then the function calculates the index value at each time point according to:
0: standardized value is within the limits (+/- cutoff)
1: standardized value exceeds the upper limit (+ cutoff)
-1: standardized value exceeds the lower limit (- cutoff)
Gene expression index
rawCounts <- c(103.5, 75.1, 97.3, 27.12, 34.83, 35.53, 40.59, 30.84, 16.39, 29.29) (sCounts <- scale(rawCounts)[,1])# standardized mean-base scaling cutoff <- seq(0.2,2,0.1) # different cutoff produce different indexes for(i in cutoff){print(index(sCounts,i))}