Utility Functions for MarkerList Objects

Description

dropvalues Drops the values associated with each marker (e.g. tissue specificity score), and returns an object of the same type as the input object. It is a shorcut for marknames(object, unlist=FALSE).

mltype returns the type of marker list or compare it with a given type:

  • character: elements are marker names/ids;
  • numeric: elements are numeric vectors (e.g., scores), named with the marker names;
  • index: elements are integer vectors corresponding to indexes in some reference data;
  • logical: elements are logical vectors, named with marker names, which result from logical operations on a MarkerList object.

rmDuplicated remove marker identifiers that are duplicated either within or between sets. Arguments in ... are not used.

hasDuplicated checks for duplicated identifiers across sets.

reverse reverse is an S4 method to reverse an object. For MarkerList object, it reverse the order of markers within each set seprately, and optionally the order of the set in the list.

nmark returns the number of markers for each cell-type. It accepts any object as an input, but is generally called on an MarkerList object or an object with an attached MarkerList object (see methods getMarkers and attachMarkers).

Usage

dropvalues(object, ..., int.ok = TRUE)

mltype(object, type = c("character", "numeric", "integer", "logical"))

rmDuplicated(object, ...)

hasDuplicated(object, which = FALSE)

reverse(object, ...)

S4 (MarkerList)
`reverse`(object, all = FALSE)

nmark(object, ...)

S4 (list)
`nmark`(object, each = FALSE)

S4 (MarkerList)
`drop`(x)

Arguments

object
an R object, typically a list that contains marker data structured in a similar way as in MarkerList objects.
...
extra argument to allow extension
int.ok
logical that indicates if integer marker names are valid, or if one should use their names instead.
type
type to compare with.
which
logical that indicates if a list of duplicated identifiers should be returned. If which=TRUE and no duplicates exist then NULL is returned.
all
a logical that indicates if the list itself, i.e., the sets should be reversed as well.
each
a logical indicating if the number of marker in each set is to be returned or only the total number (default).
x
an array (including a matrix).

Methods

  1. dropsignature(x = "MarkerList"): drop drops empty sets of markers from a MarkerList object, as well as markers with FALSE values if the object is a logical marker list. It returns the reduced MarkerList object.

  2. nmarksignature(object = "list"): The method for lists, including MarkerList objects returns the total number of markers, or optionaly its breakdown per set of markers.

  3. nmarksignature(object = "ANY"): The default method tries to extract embedded marker data from object using getMarkers, and returns the result of nmark applied to these data if present or 0L otherwise.