phylopics
phylopics
Get most specific phylopic svg url based on open tree taxonomy name and lineage
Functions
| Name | Description |
|---|---|
| get_phylopics_build_number | Get the current PhyloPic build number (required for subsequent queries). |
| get_lineage_ott_ids | Get open tree taxonomy IDs for lineage |
| get_phylopic_svg_url_from_ott_ids | Get primary SVG URL for first open tree taxonomy ID with available image |
| get_svg | Get a phylopic SVG based on a scientific name |
get_phylopics_build_number
phylopics.get_phylopics_build_number()Get the current PhyloPic build number (required for subsequent queries).
get_lineage_ott_ids
phylopics.get_lineage_ott_ids(ott_id)Get open tree taxonomy IDs for lineage
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ott_id | int | str | An open tree taxonomy ID | required |
Returns
| Name | Type | Description |
|---|---|---|
| list[int] | List of taxon IDs for given ID, most to least specific |
get_phylopic_svg_url_from_ott_ids
phylopics.get_phylopic_svg_url_from_ott_ids(ott_ids)Get primary SVG URL for first open tree taxonomy ID with available image
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ott_ids | list[int] | List of open tree taxonomy IDs from most to least specific | required |
Returns
| Name | Type | Description |
|---|---|---|
| str | Most specific available SVG URL |
get_svg
phylopics.get_svg(name)Get a phylopic SVG based on a scientific name
If no image is available, an image of the most specific available taxon will be returned
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Scientific name from open tree taxonomy | required |
Returns
| Name | Type | Description |
|---|---|---|
| lxml.etree._ElementTree | lxml tree of SVG image |