Creates unique shortcut labels for vertices based on their taxonomic profiles. The function generates two-letter shortcuts from species names and combines them to create concise labels that represent the most abundant taxa in each vertex.
Arguments
- vertices
A numeric vector of vertex indices to be labeled.
- state.space
A matrix or data frame containing the state space data, where rows correspond to different states/samples.
- taxonomy
A data structure containing taxonomic information used by the prof.fn function to generate taxonomic profiles.
- min.relAb.thld
Numeric value (default: 0.05). Minimum relative abundance threshold. Taxa with abundance below this threshold will not be included in the label.
Value
A list with two components:
- labels
A named character vector containing the generated labels, with names corresponding to vertex indices.
- profiles
A list of data frames containing the taxonomic profiles for each vertex.
Details
The function first creates taxonomic profiles for each vertex using the prof.fn function. It then generates labels based on the most abundant taxa above the specified threshold. If multiple vertices get the same label, the function ensures uniqueness by adding additional taxa information. The labels consist of two-letter shortcuts for each taxon name, created by taking the first letter of the first two parts of the underscore-separated name.