ggtree
ggtree copied to clipboard
`geom_tiplab2(geom="phylopic",...)`: errors
trafficstars
Prerequisites
- [x] Have you read Feedback and follow the guide?
- [x] make sure your are using the latest release version
- [x] read the documents
- [x] google your question/issue
Describe you issue
- [x] Make a reproducible example (e.g. 1)
- [x] your code should contain comments to describe the problem (e.g. what expected and actually happened?)
geom_tiplab2 isn't able to recover the correct phylopic image URLs. This is likely closely related to ggimage not having been updated for the new phylopic API released a while ago.
However, documenting here to confirm that this is the case, and to ask whether any short-term fixes might be implemented. Especially considering the next Bioc release is fast approaching on April 8th, after which time any Bioc packages that rely on this functionality will become deprecated by default. @GuangchuangYu
d <- data.table::fread("https://github.com/YuLab-SMU/ggtree/files/11001046/phylo_data.csv")
d <- as.data.frame(d) |> `rownames<-`(d$species)
tr <- rtree(nrow(d), tip.label = d$species)
## Error
ggtree(tr, layout = "circular" )%<+% d +
geom_tiplab2(geom="phylopic",
ggplot2::aes(image=png_uid))
Error in `geom_image()`:
! Problem while converting geom to grob.
ℹ Error occurred in the 3rd layer.
Caused by error in `download_url()`:
! Failed to download http://phylopic.org/assets/images/submissions/347bc4ab-c1e0-4313-9ea1-939c2ad71232.256.png (HTTP 404)
Run `rlang::last_trace()` to see where the error occurred.
Ask in right place
- [x] for bugs or feature requests, post here (github issue)
- [x] for questions, please post to google group
@GuangchuangYu any progress on this?