example_data
example_data(name=None)Access bundled example datasets.
This function provides access to example phylogenetic trees and metadata from published studies for use in tutorials, testing, and examples.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | Name of the dataset (filename without extension). If None, displays a listing of all available datasets and returns None. | None |
Returns
| Name | Type | Description |
|---|---|---|
| pathlib.Path: Path to the requested dataset file if name is valid. | ||
| None | If name is None or invalid, prints message and returns None. |
Examples
>>> from heattree_py import example_data, heat_tree
>>>
>>> # Show all available datasets
>>> example_data()
>>>
>>> # Get path to a specific dataset
>>> tree_path = example_data("bansal_2021_tree")
>>> metadata_path = example_data("bansal_2021_metadata")
>>>
>>> # Use directly with heat_tree
>>> heat_tree(tree_path, metadata=metadata_path)