Description Usage Arguments Value Author(s) Examples
For each variable (row), calculate a dispersion (var/mean) and a z-score of normalized dispersion.
A z-score of normalized dispersion is motivated due to correlation between means and variances.
Variables are binned (by default,n_bins=10
) by their means. Within a bin, a z-score is calculated.
It's recommended that you look at both results zdisp
and disp
to decide how to filter the data.
1 2 3 4 5 6 7 8 9 |
dat |
a time-series data matrix with |
center.dat |
a logical specifying to center the input and denoised data. By default, |
scale.dat |
a logical specifying to scale the input and denoised data. By default, |
verbose |
a logical specifying to print the computational progress. By default, |
seed |
a seed for the random number generator. |
... |
optional arguments. |
timepoints |
a vector of time points for columns of dat. |
dof |
the degree of freedom in spline.smooth. By default, |
dispersion
returns a data.frame of statistics for m
variables (rows).
Neo Christopher Chung nchchung@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
data(cys_optm)
meta <- cys_optm[,1:4]
optm <- log(cys_optm[meta$Select,5:10])
optm <- t(scale(t(optm), scale=TRUE, center=TRUE))
days <- as.numeric(colnames(optm))
disp_optm <- dispersion(optm, timepoints = days, dof="cv")
disp_optm <- cbind(meta, disp_optm)
# make a histogram of dispersion statistics
hist(disp_optm$disp, 100)
# make a histogram of z-score of normalized dispersion
hist(disp_optm$zdisp, 100)
# library(readr)
# write_excel_csv(disp_optm, file="~/coptm_dispersion.csv")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.