View source: R/VarID_functions.R
compNoise | R Documentation |
This function performs computation of the local gene expression variability across the pruned k nearest neighbours at given link probability cutoff. The estimated variance is corrected for the mean dependence utilizing the baseline model of gene expression variance.
compNoise(
x,
res,
pvalue = 0.01,
genes = NULL,
regNB = FALSE,
batch = NULL,
regVar = NULL,
offsetModel = TRUE,
thetaML = FALSE,
theta = 10,
ngenes = NULL,
span = 0.75,
step = 0.01,
thr = 0.05,
no_cores = NULL,
seed = 12345
)
x |
Matrix of gene expression values with genes as rows and cells as columns. The matrix need to contain the same cell IDs as columns like the input matrix used to derive the pruned k nearest neighbours with the |
res |
List object with k nearest neighbour information returned by |
pvalue |
Positive real number between 0 and 1. All nearest neighbours with link probability |
genes |
Vector of gene names corresponding to a subset of rownames of |
regNB |
logical. If |
batch |
vector of batch variables. Component names need to correspond to valid cell IDs, i.e. column names of |
regVar |
data.frame with additional variables to be regressed out simultaneously with the log UMI count and the batch variable (if |
offsetModel |
Logical parameter. Only considered if |
thetaML |
Logical parameter. Only considered if |
theta |
Positive real number. Fixed value of the dispersion parameter. Only considered if |
ngenes |
Positive integer number. Randomly sampled number of genes (from rownames of |
span |
Positive real number. Parameter for loess-regression (see |
step |
Positive real number between 0 and 1. See function |
thr |
Positive real number between 0 and 1. See function |
no_cores |
Positive integer number. Number of cores for multithreading. If set to |
seed |
Integer number. Random number to initialize stochastic routines. Default is 12345. |
List object of three components:
model |
the baseline noise model as computed by the |
data |
matrix with local gene expression variability estimates, corrected for the mean dependence. |
regData |
If |
res <- pruneKnn(intestinalDataSmall,knn=10,alpha=1,no_cores=1,FSelect=FALSE)
noise <- compNoise(intestinalDataSmall,res,pvalue=0.01,genes = NULL,no_cores=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.