rankGenes {singscore}R Documentation

Rank genes by the gene expression intensities

Description

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'.

Usage

rankGenes(expreMatrix, tiesMethod = "min")

## S4 method for signature 'matrix'
rankGenes(expreMatrix, tiesMethod = "min")

## S4 method for signature 'data.frame'
rankGenes(expreMatrix, tiesMethod = "min")

## S4 method for signature 'DGEList'
rankGenes(expreMatrix, tiesMethod = "min")

## S4 method for signature 'ExpressionSet'
rankGenes(expreMatrix, tiesMethod = "min")

## S4 method for signature 'SummarizedExperiment'
rankGenes(expreMatrix, tiesMethod = "min")

Arguments

expreMatrix

A gene expression matrix (matrix,data.frame) or S4 object (ExpressionSet,DGEList, SummarizedExperiment)

tiesMethod

A character indicating what method to use when dealing with ties

Value

The ranked gene expression matrix that has samples in columns and genes in rows

See Also

rank ExpressionSet SummarizedExperiment DGEList

Examples

rankGenes(toy_expr_se) # toy_expr_se is a gene expression dataset
tiesMethod = 'min'
# get counts from toy_expr_se
counts <- SummarizedExperiment::assay(toy_expr_se)
# or it can be a ExpressionSet object

e <- Biobase::ExpressionSet(assayData = as.matrix(counts))
rankGenes(e) 

[Package singscore version 1.0.0 Index]