Complements test_differential() for the features a quantitative test cannot
rank: those detected in one condition and (nearly) absent from the other,
which in immunopeptidomics are often the biologically interesting ligands.
For every feature and contrast a Fisher exact test is run on the 2x2 table of
detected / not-detected units, with Benjamini–Hochberg adjustment within the
contrast. Their fold change is undefined by construction — imputing one would
make it an artefact of the imputation width — so detection frequency, not
intensity, is what is tested.
Arguments
- mat
Numeric matrix (before or after imputation; detection is taken from the
imputedattribute when present, otherwise from!is.na(mat)).- coldata
Column metadata from
build_quant_matrix().- contrasts
List of length-2 character vectors, or
NULL(default) for all pairwise comparisons.