Keeps the features quantified in at least min_per_group units of at least
one condition. A feature observed once cannot support a variance estimate,
and in DDA it is dominated by stochastic precursor sampling; requiring the
minimum in only one group (rather than all) deliberately retains the
condition-exclusive ligands, which the presence/absence track
(test_detection()) tests instead.
Arguments
- mat
Numeric matrix from
build_quant_matrix().- coldata
The matching
coldatadata frame (needsUnit,Condition).- min_per_group
Minimum number of units with a quantified value in at least one condition. Default
2.
Value
The filtered matrix, with attributes n_dropped (integer) and
dropped (character vector of removed feature names).
Examples
if (FALSE) { # \dontrun{
mat_f <- filter_quant(qm$mat, qm$coldata, min_per_group = 2)
attr(mat_f, "n_dropped")
} # }