AUCell_buildRankings | 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,
featureType = "genes",
plotStats = TRUE,
splitByBlocks = FALSE,
BPPARAM = NULL,
keepZeroesAsNA = FALSE,
verbose = TRUE,
nCores = NULL,
mctype = NULL,
...
)
## S4 method for signature 'dgCMatrix'
AUCell_buildRankings(
exprMat,
featureType = "genes",
plotStats = TRUE,
splitByBlocks = TRUE,
BPPARAM = NULL,
keepZeroesAsNA = FALSE,
verbose = TRUE,
nCores = NULL,
mctype = NULL
)
## S4 method for signature 'matrix'
AUCell_buildRankings(
exprMat,
featureType = "genes",
plotStats = TRUE,
splitByBlocks = FALSE,
BPPARAM = NULL,
keepZeroesAsNA = FALSE,
verbose = TRUE,
nCores = NULL,
mctype = NULL
)
## S4 method for signature 'ExpressionSet'
AUCell_buildRankings(
exprMat,
featureType = "genes",
plotStats = TRUE,
splitByBlocks = FALSE,
BPPARAM = NULL,
keepZeroesAsNA = FALSE,
verbose = TRUE,
nCores = NULL,
mctype = NULL
)
## S4 method for signature 'SummarizedExperiment'
AUCell_buildRankings(
exprMat,
featureType = "genes",
plotStats = TRUE,
splitByBlocks = FALSE,
BPPARAM = NULL,
keepZeroesAsNA = FALSE,
verbose = TRUE,
assayName = NULL,
nCores = NULL,
mctype = NULL
)
exprMat |
Expression matrix (genes as rows, cells as columns) The expression matrix can also be provided as one of the R/Bioconductor classes:
|
featureType |
Name for the rows (e.g. "genes"). Only for naming the rankings, not used internally. |
plotStats |
Should the function plot the expression boxplots/histograms?
(TRUE / FALSE). These plots can also be produced
with the function |
splitByBlocks |
Whether to split the matrix by blocks in the ranking calculation. Allows using multiple cores. FALSE by default. If using sparse matrices it is automatically set to TRUE. |
BPPARAM |
Set to use multiple cores. Only used if 'splitByBlocks=TRUE' |
keepZeroesAsNA |
Convert zeroes to NA instead of locating randomly at the end of the ranking. |
verbose |
Should the function show progress messages? (TRUE / FALSE) |
nCores |
Deprecated |
mctype |
Deprecated |
... |
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.
Ranking of the feature within the cell (features as rows, cells as columns)
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.