R/GET_discriminant_features.R
get_discriminant_features.RdIntegrates clustering, indicator analysis, differential testing, and Random Forest importance into a unified workflow.
get_discriminant_features(
tibble_profile,
analysis,
feature_col,
metadata,
group_col = NULL,
norm = "hellinger",
min_presence = 2
)Wide profile table (features × MAGs)
Character: "KEGG", "Pfam", "INTERPRO", "dbCAN", or "MEROPS"
Column name containing feature IDs
MAG-level metadata (rownames = MAG identifiers)
Metadata column to discriminate (e.g. "Depth", "Class", "Phylum")
Normalization method ("hellinger" or "clr")
Minimum number of MAGs in which a feature must appear
List with: matrices (counts, hellinger, clr), clustering, indicator results, differential tests, Random Forest importance, and consensus ranking.