Enforcing Marker Block Patterns

Description

This method enforces marker block patterns on a numeric matrix, which typically is the basis matrix of the NMF model being estimated.

Usage

enforceMarkers(object, markers, ...)

S4 (matrix,list)
`enforceMarkers`(object, markers, ratio = NULL, value = NULL, eps = NULL, 
  attach = FALSE)

Arguments

object
a numeric matrix or an NMF-class object
markers
a numeric vector or the list of markers to enforce. This is usually an MarkerList object, but can be any list, as long as it contains markers that can matched to rows in object. If markers is a single numeric, then it specifies the number of markers to enforce in each cell-type. The markers are enforced on the top -- basis -- rows of object. If markers is a numeric vector, then its length must be the number of columns (basis) in object.
ratio
a single numeric value specifying the minimum expression fold change to enforce. If NULL or zero, then the expression values of each marker are forced to 0 on non-related cell types. Default is NULL.
value
a single numeric value specifying the expression value to enforce on the cell-type related to each marker. If NULL this value is left unchanged. Default is NULL.
eps
minimum value imposed for null entries.
attach
logical that indicates if the markers should be attached to the matrix data, as attibute 'markers'.
...
extra arguments to allow extension, and passed down to the workhorse method enforceMarkers,matrix,list.

Value

the input object with the marker block patterns enforced

Details

The block patterns are defined by a list of markers whose expression is cell-type specific. The expression value e_ij for a given marker i, on its respective cell-type j is forced to a given value; while its expression e_ik on any other cell-type k is forced to 0 or to be a certain times lower than e_ij: e_ik = min(e_ij/f - EPS, e_ik).

Methods

  1. enforceMarkerssignature(object = "matrix", markers = "list"): Enforce marker patterns specified as a list.

    This is the workhorse method that is eventually called by all other methods.

  2. enforceMarkerssignature(object = "matrix", markers = "numeric"): Enforce a given number of marker patterns

  3. enforceMarkerssignature(object = "NMF", markers = "ANY"): The method for an NMF object enforces the markers on its basis matrix and sets its basis names to the marker list's names, if none were already defined.

Author

Renaud Gaujoux