Description Usage Arguments Value Author(s) See Also Examples
getPValues performs a permutation test on the gene-cell type specificity score to obtain a p-value value on each gene-cell type specificity score. The permutation keeps everything the same except that cell type assignments are permuted between the cells (but note that cell type proportions are also kept the same). This function is a way to select all differentially expressed genes between all cell classes globally in a dataset in one go or to define differentially expressed genes in a specific cell cluster.
1 2 3 4 5 6 7 8 9 | getPValues(
gs,
numPerm = 5,
correctMethod = "BH",
testGenes = NULL,
subsetCells = NULL,
cores = 1,
seed = 111
)
|
gs |
The output of |
numPerm |
The number of permutations to do. The default value 5 is to ensure quick running time for very large datasets but can be increased to increase the power of the permutation test, see Details. |
correctMethod |
The method used to correct p-values for multiple
hypothesis testing. Any valid input to "method" in |
testGenes |
A character vector of gene names to restrict the output p-values to. |
subsetCells |
A numeric vector of cell indeces to restrict the
permutation to. Note that the selected cells should still contain at least
one cell from each of the cell clusters contained in |
cores |
An integer greater than zero (1 by default) that indicates how many cores to use for parallelization using mclapply. |
seed |
The seed for random permutations. |
getPValues
returns a list with the following components:
permuteVal |
A sparse matrix with as many rows as genes and as many
columns as |
startIndeces |
A numeric vector of length |
pval |
A matrix with as many rows as genes and
columns as |
adjpval |
A matrix with the same size as |
Mahmoud M Ibrahim <mmibrahim@pm.me>
getMarkers
1 2 3 4 5 | data(kidneyTabulaMuris)
gs = sortGenes(kidneyTabulaMuris$exp, kidneyTabulaMuris$cellType)
pp = getPValues(gs)
#obtain genes that are "differentially expressed" in at least one cluster
markers = names(which(apply(pp$adjpval, 1, function(x) any(x < 0.01))))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.