Reordering Marker Lists

Description

The method reorder for MarkerList objects allows to reorder each set of markers according to some auxiliary reference data, e.g, their gene expression in different cell types.

sort sorts each element of a marker list.

Usage

S4 (MarkerList)
`reorder`(x, data, by = NULL, fun = max, by.fun = rowMins, decreasing = !missing(data))

S3 (MarkerList)
`sort`(x, decreasing = FALSE, ...)

Arguments

x
a MarkerList object
data
reference data as a numeric vector, a matrix, or an ExpressionSet object. These data must have names or rownames against which markers can be match.
by
optional factor only used when data is a matrix-like object, to
fun
function to perform the second step in the computation of scores (cf. argument by).
by.fun
function to perform the first step in the computation of scores (cf. argument by).
decreasing
logical that indicates how the markers should be ordered according to their score.
...
optional: extra arguments supplied to FUN

Value

a MarkerList object that also contain the computed scores.

Details

When data is a matrix-like object, a score is computed for each marker in two steps: the first step computes scores for each marker within each group of columns defined by the levels of by (function rowMins); the second step aggregates these scores into a single value for each marker (function fun).

The markers are then ordered wihtin their respective set, according to the score and argument decreasing.