| Title: | Infrastructure for Ethnobotanical and Phytochemical Data Integration with Wikidata |
|---|---|
| Description: | Infrastructure and curated ethnobotanical and phytochemical datasets for analyzing plant families, including phylogenetic integration and visualization tools. Includes vendored functions from the 'cascade' package (https://github.com/adafede/cascade) to minimize the dependency tree. |
| Authors: | Adriano Rutz [aut, cre] (ORCID: <https://orcid.org/0000-0003-0443-9902>) |
| Maintainer: | Adriano Rutz <[email protected]> |
| License: | AGPL (>= 3) |
| Version: | 0.0.0.9001 |
| Built: | 2026-10-28 00:03:18 UTC |
| Source: | https://github.com/adafede/EthnoBotaPhyWR |
Collects and plots ethnobotanical and phytochemical data for a given taxon. This function performs data retrieval, merging, and logging, and produces summary statistics and outputs for downstream analysis and visualization.
ethnobotafever_tree( taxon_name, n_multiple_genera, n_ethnobotanical_count_min, n_compounds_count_min, example_family_names, path_molecules, path_classes, path_ethnobotanical, export_tree_full, export_tree_phyto, export_tree_phyto_sub, export_table_classified, export_table_counts, export_table_counts_sub, local_cache, log_dir )ethnobotafever_tree( taxon_name, n_multiple_genera, n_ethnobotanical_count_min, n_compounds_count_min, example_family_names, path_molecules, path_classes, path_ethnobotanical, export_tree_full, export_tree_phyto, export_tree_phyto_sub, export_table_classified, export_table_counts, export_table_counts_sub, local_cache, log_dir )
taxon_name |
Character. Name of the taxon of interest. |
n_multiple_genera |
Integer. Minimum number of genera for filtering. |
n_ethnobotanical_count_min |
Integer. Minimum ethnobotanical count for filtering. |
n_compounds_count_min |
Integer. Minimum compound count for filtering. |
example_family_names |
Character vector. Example family names for comparison. |
path_molecules |
Character, data.frame, or NULL. Local molecules file or table. |
path_classes |
Character, data.frame, or NULL. Local classes file or seed data. |
path_ethnobotanical |
Character, data.frame, or NULL. Local ethnobotanical file or table. |
export_tree_full |
Character. Path for the main full-tree PDF figure. |
export_tree_phyto |
Character. Path for the phytochemical overview PDF figure. |
export_tree_phyto_sub |
Character. Path for the species-level phytochemical PDF figure. |
export_table_classified |
Character. Path for the classified compounds export. |
export_table_counts |
Character. Path for the genus-level summary table export. |
export_table_counts_sub |
Character or NULL. Path for the filtered species-level counts export. |
local_cache |
Character. Directory containing |
log_dir |
Character. Directory for log files. |
This function is a pipeline for data collection, merging, and reporting. It logs progress and statistics throughout. All side effects (file writes, logs) are documented inline.
A list containing the rendered plots, exported tables, and the log-file path.
NULLNULL
NPClassifier taxonomy results for SMILES strings found in Orchidaceae. Maps each unique SMILES to its pathway, superclass, class, and glycoside status.
orchids_compound_classesorchids_compound_classes
A data.frame with 1574 rows and 5 columns:
Canonical SMILES string
NPClassifier pathway classification
NPClassifier superclass classification
NPClassifier class classification
Logical: whether compound is a glycoside
This dataset is a deduplicated lookup table for compound classifications. Use it to quickly retrieve NPClassifier results for a given SMILES string without querying the live API.
NPClassifier Web Service (https://npclassifier.gnps2.org/)
data(orchids_compound_classes) head(orchids_compound_classes) nrow(orchids_compound_classes)data(orchids_compound_classes) head(orchids_compound_classes) nrow(orchids_compound_classes)
A dataset containing phytochemical information from Orchidaceae species. This is a curated subset linking taxonomic data, chemical structures (SMILES), and NPClassifier taxonomy.
orchids_compoundsorchids_compounds
A data.frame with 3055 rows and 10 columns:
Wikidata QID (Q-identifier) for the species
Scientific name of the species
Wikidata QID for the chemical compound
Canonical SMILES representation
InChIKey chemical identifier
First block of InChIKey (connectivity skeleton)
NPClassifier pathway classification
NPClassifier superclass classification
NPClassifier class classification
Logical: whether compound is a glycoside
Curated from:
Wikidata (https://www.wikidata.org/)
LOTUS database (https://lotus.naturalproducts.net/)
NPClassifier (https://npclassifier.gnps2.org/)
data(orchids_compounds) head(orchids_compounds) table(orchids_compounds$superclass)data(orchids_compounds) head(orchids_compounds) table(orchids_compounds$superclass)
A dataset of ethnobotanical uses reported for Orchidaceae species, linked to their Open Tree of Life (OTT) taxonomy identifiers.
orchids_ethnobotanicalorchids_ethnobotanical
A data.frame with 419 rows and 3 columns:
Scientific name of the species
Wikidata QID (Q-identifier) for the species
Open Tree of Life taxonomy identifier
Each row represents a species with documented ethnobotanical uses.
The taxon_id_ott field enables integration with phylogenetic analyses
via the Open Tree of Life API.
Wikidata (https://www.wikidata.org/) and Open Tree of Life (https://tree.opentreeoflife.org/)
data(orchids_ethnobotanical) head(orchids_ethnobotanical) nrow(orchids_ethnobotanical)data(orchids_ethnobotanical) head(orchids_ethnobotanical) nrow(orchids_ethnobotanical)
Precomputed tree cache generated by get_trees_cached() for the Orchidaceae
pipeline. The .rda file contains a single object named
trees_5141741f198446414395a45383e3a7ec.
trees_5141741f198446414395a45383e3a7ectrees_5141741f198446414395a45383e3a7ec
An .rda file containing a list with:
A tidytable/data.frame of taxa that were not found in the tree
A phylo object for the full induced tree
A phylo object for the phytochemical subset tree
Generated by get_trees_cached() from Open Tree of Life queries.
Precomputed tree cache generated by get_trees_cached() for the Orchidaceae
pipeline. The .rda file contains a single object named
trees_886f2bbc1ee37e9433e35b78f5db91ef.
trees_886f2bbc1ee37e9433e35b78f5db91eftrees_886f2bbc1ee37e9433e35b78f5db91ef
An .rda file containing a list with:
A tidytable/data.frame of taxa that were not found in the tree
A phylo object for the full induced tree
A phylo object for the phytochemical subset tree
Generated by get_trees_cached() from Open Tree of Life queries.
Precomputed tree cache generated by get_trees_cached() for the Orchidaceae
pipeline. The .rda file contains a single object named
trees_8cca7de252bc0994398aec413cebdbbc.
trees_8cca7de252bc0994398aec413cebdbbctrees_8cca7de252bc0994398aec413cebdbbc
An .rda file containing a list with:
A tidytable/data.frame of taxa that were not found in the tree
A phylo object for the full induced tree
A phylo object for the phytochemical subset tree
Generated by get_trees_cached() from Open Tree of Life queries.
Precomputed tree cache generated by get_trees_cached() for the Orchidaceae
pipeline. The .rda file contains a single object named
trees_9a06c9c148110e62a4e1d2ff8094e462.
trees_9a06c9c148110e62a4e1d2ff8094e462trees_9a06c9c148110e62a4e1d2ff8094e462
An .rda file containing a list with:
A tidytable/data.frame of taxa that were not found in the tree
A phylo object for the full induced tree
A phylo object for the phytochemical subset tree
Generated by get_trees_cached() from Open Tree of Life queries.