Explore the taxonomic hierarchy
Here we present a practical guide to the funga_get_children_taxa() function of the fungaR package. It retrieves all child taxa — species, subspecies, varieties, and so on — below a given taxonomic name and rank, which is useful for getting every species in a genus, every genus in an order, and similar hierarchy traversals.
Function Overview
funga_get_children_taxa() first locates the parent taxon in the Flora e Funga do Brasil (FFB) checklist, then returns every taxon whose lineage includes that parent’s taxon ID. Fungi are classified in FFB by Division (phylum-equivalent, e.g. Ascomycota, Basidiomycota) rather than Class, and FFB does not register a standalone family-rank taxon record for Fungi — rank = "family" is still supported, but matched directly against the family classification column on genus/species records instead of walking a family-rank row.
Arguments
| Argument | Description |
|---|---|
taxon_name |
Character. Scientific name to search for (e.g. "Trichoderma", "Xylariaceae", "Agaricales"). |
rank |
Character. Taxonomic rank of taxon_name: "division", "order", "family", "genus", or "species". Default "genus". |
child_rank |
Character or NULL. Rank(s) to return as children. NULL (default) returns all descendant ranks; a single rank (e.g. "species") restricts the result to that rank only. Requesting child_rank = "family" from a division/order returns a derived summary (family name, order, and genus count) rather than real FFB rows, since none exist for Fungi. |
include_synonyms |
Logical. If TRUE, includes synonym names in addition to accepted ones. Default FALSE. |
version |
FFB dataset version to use. Defaults to "latest". |
rm_funga_database |
If TRUE, deletes the cached database after the search. Default FALSE is recommended for repeated use. |
verbose |
Logical. If TRUE (default), prints progress messages. |
Get all species in a genus
library(fungaR)
species <- funga_get_children_taxa(taxon_name = "Trichoderma",
rank = "genus",
child_rank = "species")Get every descendant of a genus
Species, subspecies, and varieties together:
all_descendants <- funga_get_children_taxa(taxon_name = "Trichoderma",
rank = "genus",
child_rank = NULL)Get all genera in a family, including synonyms
Matched via the family classification column, since FFB has no family-rank row for Fungi:
genera <- funga_get_children_taxa(taxon_name = "Xylariaceae",
rank = "family",
child_rank = "genus",
include_synonyms = TRUE)Get all genera in an order
genera_in_order <- funga_get_children_taxa(taxon_name = "Agaricales",
rank = "order",
child_rank = "genus")Additional Tips
- Set
child_rank = NULLwhen you want a complete picture of a group’s diversity, including infraspecific taxa; set it to a single rank (e.g."species") when you specifically need a species-level checklist for downstream work. rankmust correctly describetaxon_name(e.g. don’t pass a genus name withrank = "order") — the function looks up the parent by matching both together.- Combine with
funga_records()when you need geographic or trait filters in addition to hierarchy traversal (e.g. all species in a genus that are also endemic to a given state).