AUCell_buildRankings {AUCell} | R Documentation |
Builds the "rankings" for each cell: expression-based ranking for all the genes in each cell.
The genes with same expression value are shuffled. Therefore, genes with expression '0' are randomly sorted at the end of the ranking.
These "rankings" can be seen as a new representation of the original dataset. Once they are calculated, they can be saved for future analyses.
AUCell_buildRankings(exprMat, plotStats = TRUE, nCores = 1, verbose = TRUE, ...) ## S4 method for signature 'matrix' AUCell_buildRankings(exprMat, plotStats = TRUE, nCores = 1, verbose = TRUE) ## S4 method for signature 'dgCMatrix' AUCell_buildRankings(exprMat, plotStats = TRUE, nCores = 1, verbose = TRUE) ## S4 method for signature 'SummarizedExperiment' AUCell_buildRankings(exprMat, plotStats = TRUE, nCores = 1, verbose = TRUE, assayName = NULL) ## S4 method for signature 'ExpressionSet' AUCell_buildRankings(exprMat, plotStats = TRUE, nCores = 1, verbose = TRUE)
exprMat |
Expression matrix (genes as rows, cells as columns) The expression matrix can also be provided as one of the Bioconductor classes:
|
plotStats |
Should the function plot the expression boxplots/histograms?
(TRUE / FALSE). These plots can also be produced
with the function |
nCores |
Number of cores to use for computation. |
verbose |
Should the function show progress messages? (TRUE / FALSE) |
... |
Other arguments |
assayName |
Name of the assay containing the expression matrix (e.g. in SingleCellExperiment objects) |
It is important to check that most cells have at least the number of expressed/detected genes that are going to be used to calculate the AUC ('aucMaxRank' in 'calcAUC()'). The histogram provided by 'AUCell_buildRankings()' allows to quickly check this distribution. 'plotGeneCount(exprMatrix)' allows to obtain only the plot before building the rankings.
data.table of genes (row) by cells (columns) with the ranking of the gene within the cell.
Next step in the workflow: AUCell_calcAUC
.
See the package vignette for examples and more details:
vignette("AUCell")
# This example is run using a fake expression matrix. # Therefore, the output will be meaningless. ############# Fake expression matrix ############# set.seed(123) exprMatrix <- matrix(data=sample(c(rep(0, 5000), sample(1:3, 5000, replace=TRUE))), nrow=20, dimnames=list(paste("Gene", 1:20, sep=""), paste("Cell", 1:500, sep=""))) ################################################## cells_rankings <- AUCell_buildRankings(exprMatrix, plotStats=TRUE) cells_rankings