View source: R/VarID_functions.R
compMean | R Documentation |
This function performs computation of locally averaged gene expression across the pruned k nearest neighbours at given link probability cutoff.
compMean(
x,
res,
pvalue = 0.01,
genes = NULL,
regNB = FALSE,
batch = NULL,
regVar = NULL,
offsetModel = TRUE,
thetaML = FALSE,
theta = 10,
ngenes = NULL,
span = 0.75,
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 |
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:
mean |
matrix with local gene expression averages, computed from Pearson residuals (if |
regData |
If |
res <- pruneKnn(intestinalDataSmall,knn=10,alpha=1,no_cores=1,FSelect=FALSE)
mexp <- compMean(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.