Count Feature Carriers Over an Explicit Vertex Set
Source:R/gfc_flow.R
vertices.feature.carriers.RdGiven a vector of vertex indices vertices and a samples-by-features
matrix X, compute for each feature (column of X) the number
k and proportion p of supplied vertices for which
X[vertex, feature] > eps.
This is a vertex-set analogue of basin.feature.carriers(), intended
for situations where the region of interest is provided directly as an index
vector rather than looked up from a basin in a gfc.flow object.
Arguments
- object
Integer or numeric vector identifying the vertices/samples to include. Interpretation depends on
match.by.- X
A numeric matrix (or data.frame coercible to a numeric matrix) with samples/vertices in rows and features in columns.
- eps
A non-negative numeric threshold. A feature is considered present in a vertex if
X > eps. Default is 0.- match.by
Character string controlling how
verticesare mapped to rows ofX. One of:"index"(default): treatverticesas 1-based row indices intoX"rownames": treatverticesas row names ofX(requires rownames)
- drop.missing
Logical; only relevant for
match.by="rownames". If TRUE (default), silently drop vertices not found inrownames(X). If FALSE, error if any are missing.- unique
Logical; if TRUE (default), unique the resolved vertex set.
- sort
Logical; if TRUE (default), sort the resolved vertex set (after uniquing).
- vertices
Backward-compatible alias for
object.- ...
Additional arguments (currently ignored).