rankGenes | R Documentation |
The rankGenes
function is a generic function that can deal
with mutilple types of inputs. Given a matrix of gene expression that has
samples in columns, genes in rows, and values being gene expression
intensity,rankGenes
ranks gene expression intensities in each sample.
It can also work with S4 objects that have gene expression matrix as a
component (i.e ExpressionSet, DGEList,SummarizedExperiment). It calls the
rank
function in the base package which ranks the gene expression
matrix by its absolute expression level. If the input is S4 object of
DGEList, ExpressionSet, or SummarizedExperiment
, it will extract the
gene expression matrix from the object and rank the genes. The default
'tiesMethod' is set to 'min'.
rankGenes(expreMatrix, tiesMethod = "min", stableGenes = NULL)
## S4 method for signature 'matrix'
rankGenes(expreMatrix, tiesMethod = "min", stableGenes = NULL)
## S4 method for signature 'data.frame'
rankGenes(expreMatrix, tiesMethod = "min", stableGenes = NULL)
## S4 method for signature 'DGEList'
rankGenes(expreMatrix, tiesMethod = "min", stableGenes = NULL)
## S4 method for signature 'ExpressionSet'
rankGenes(expreMatrix, tiesMethod = "min", stableGenes = NULL)
## S4 method for signature 'SummarizedExperiment'
rankGenes(expreMatrix, tiesMethod = "min", stableGenes = NULL)
expreMatrix |
matrix, data.frame, ExpressionSet, DGEList or SummarizedExperiment storing gene expression measurements |
tiesMethod |
character, indicating what method to use when dealing with ties |
stableGenes |
character, containing a list of stable genes to be used to
rank genes using expression of stable genes. This is required when using the
stable genes dependent version of singscore (see details in |
The ranked gene expression matrix that has samples in columns and genes in rows. Unit normalised ranks are returned if data is ranked using stable genes
getStableGenes
, simpleScore
,
rank
, "ExpressionSet",
"SummarizedExperiment",
"DGEList"
rankGenes(toy_expr_se) # toy_expr_se is a gene expression dataset
# ExpressionSet object
emat <- SummarizedExperiment::assay(toy_expr_se)
e <- Biobase::ExpressionSet(assayData = as.matrix(emat))
rankGenes(e)
#scoring using the stable version of singscore
rankGenes(e, stableGenes = c('2', '20', '25'))
## Not run:
#for real cancer or blood datasets, use getStableGenes()
rankGenes(cancer_expr, stableGenes = getStableGenes(5))
rankGenes(blood_expr, stableGenes = getStableGenes(5, type = 'blood'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.