This function fits negative binomial models to transcript counts of pruned k-nearest neighbourhoods inferred by pruneKnn
thereby deconvoluting variability into sampling noise, global cell-to-cell variability of transcript counts, and residual variability, which corresponds to biological noise.
compTBNoise(
res,
expData,
pvalue = 0.01,
genes = NULL,
minN = 5,
no_cores = NULL,
gamma = 0.5,
x0 = 0,
lower = 0,
upper = 100
)
List object of three components:
Vector of mean expression for all k-nearest neighbourhoods. Componenets are set to NA
if less than minN
neighbours are present in pruned neighbourhood.
Vector of dispersion parameters capturing global cell-to-cell variability of transcript counts for all k-nearest neighbourhoods. Componenets are set to NA
if less than minN
neighbours are present in pruned neighbourhood.
Matrix of biological noise estimates for all genes across for all k-nearest neighbourhoods. Componenets are set to NA
if less than minN
neighbours present in pruned neighbourhood.
List of parameters.
List object with k nearest neighbour information returned by pruneKnn
function.
Matrix of gene expression values with genes as rows and cells as columns. These values have to correspond to unique molecular identifier counts.
Positive real number between 0 and 1. All nearest neighbours with link probability < pvalue
are discarded. Default is 0.01.
Vector of gene names corresponding to a subset of rownames of expData
. Only for these genes local gene expression variability is computed. Default is NULL
and values for all genes are returned.
Positive integer number. Noise inference is only done for k-nearest neighbourhoods with at least minN
neighbours remaining after pruning.
Positive integer number. Number of cores for multithreading. If set to NULL
then the number of available cores minus two is used. Default is NULL
.
Positive real number. Scale paramter of the cauchy prior. Default is 0.5.
Real number greater or equal to zero. Location parameter of the cauchy prior.
Real number greater or equal to zero. Lower bound for the maximum a posterior inference of the biological noise. Default is 0.
Real number greater or equal to zero. Upper bound for the maximum a posterior inference of the biological noise. Default is 100.
if (FALSE) {
res <- pruneKnn(intestinalDataSmall,knn=10,alpha=1,no_cores=1,FSelect=FALSE)
noise <- compTBNoise(res,intestinalDataSmall,pvalue=0.01,genes = NULL,no_cores=1)
}
Run the code above in your browser using DataLab