Normalize aggregate markers on canonical names (build-time)
Source:R/clean.R
normalize_aggregate_name.RdFolds every aggregate marker a backbone or enrichment source may use to one
canonical form, "<binomial> aggr.", so taxify's matching engine and
enrichment join recognize aggregates uniformly regardless of source spelling.
Two cases are handled:
a name already carrying a marker (
agg.,aggr.,-agg,s.l.,sensu lato,coll. sp.) is rewritten to"<binomial> aggr.";a name at an aggregate rank (
taxon_ranksuch as"SPECIES AGGREGATE","AGGR.","COLL. SP.") that carries no marker gets" aggr."appended.
Exported for the taxifydb build pipeline so the build and runtime sides share one definition.