ggtreeExtra

:lemon: Add Geom Layers On Circular Or Other Layout Tree Of “ggtree”

https://github.com/yulab-smu/ggtreeextra

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 15 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 7 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.4%) to scientific vocabulary

Keywords from Contributors

bioconductor-package gene microbiome microbiome-analysis microbiome-data ontology bioconductor exon human illumina
Last synced: 6 months ago · JSON representation

Repository

:lemon: Add Geom Layers On Circular Or Other Layout Tree Of “ggtree”

Basic Info
Statistics
  • Stars: 93
  • Watchers: 4
  • Forks: 17
  • Open Issues: 12
  • Releases: 0
Created almost 6 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: 
  md_document:
    variant: gfm
html_preview: false
---



# ggtreeExtra: An R Package To Add Geom Layers On Circular Or Other Layout Tree Of "ggtree".

```{r, echo=FALSE, results="hide", message=FALSE}
library(badger)
```

`r badge_bioc_release("ggtreeExtra", "green")`
`r badge_devel("YuLab-SMU/ggtreeExtra", "green")`
[![Bioc](http://www.bioconductor.org/shields/years-in-bioc/ggtreeExtra.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtreeExtra.html#since)
[![platform](http://www.bioconductor.org/shields/availability/devel/ggtreeExtra.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtreeExtra.html#archives)

```{r, comment="", echo=FALSE, results='asis'}
cat(packageDescription('ggtreeExtra')$Description)
```

# :writing_hand: Author

[Shuangbin Xu](https://github.com/xiangpin) and [GuangChuang Yu](https://guangchuangyu.github.io)

School of Basic Medical Sciences, Southern Medical University.

If you use `ggtreeExtra` in published research. Please cite the paper:

__S Xu__, Z Dai, P Guo, X Fu, S Liu, L Zhou, W Tang, T Feng, M Chen, L Zhan, T Wu, E Hu, Y Jiang^\*^, X Bo^\*^ and __G Yu__\*. ggtreeExtra: Compact visualization of richly annotated phylogenetic data. __*Molecular Biology and Evolution*__. 2021, 38(9):4039-4042. doi: [10.1093/molbev/msab166](https://doi.org/10.1093/molbev/msab166).

   - [Source code to produce Supplementary Material](https://github.com/YuLab-SMU/plotting-tree-with-data-using-ggtreeExtra)



# :arrow_double_down: Installation

The development version from `github`:

```r
if (!requireNamespace("devtools", quietly=TRUE))
    install.packages("devtools")
devtools::install_github("xiangpin/ggtreeExtra")
```

The released version from [`Bioconductor`](https://bioconductor.org/packages/ggtreeExtra):

```r
if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")

## BiocManager::install("BiocUpgrade") ## you may need this
BiocManager::install("ggtreeExtra")
```

# :beginner: Usage

Please refer to the [online vignette](https://bioconductor.org/packages/devel/bioc/vignettes/ggtreeExtra/inst/doc/ggtreeExtra.html).

```{r, eval=FALSE, echo=FALSE}
library(ggtreeExtra)
library(ggtree)
library(ggplot2)
library(treeio)
library(ggnewscale)
library(ggstar)

trfile <- system.file("extdata", "tree.nwk", package="ggtreeExtra")
tippoint1 <- system.file("extdata", "tree_tippoint_bar.csv", package="ggtreeExtra")
ring1 <- system.file("extdata", "first_ring_discrete.csv", package="ggtreeExtra")
ring2 <- system.file("extdata", "second_ring_continuous.csv", package="ggtreeExtra")
ringpoint <- system.file("extdata", "second_ring_point.csv", package="ggtreeExtra")

tr <- read.tree(trfile)
dat1 <- read.csv(tippoint1)
dat2 <- read.csv(ring1)
dat3 <- read.csv(ring2)

p <- ggtree(tr, layout="fan", size=0.1, open.angle=10) + 
    geom_treescale(x=6, y=0, linesize=0.2, fontsize=1.2)

p1 <- p %<+% dat1 + 
          geom_star(mapping=aes(fill=Location, size=Length, starshape=Group),
                    starstroke=0.2) +
          scale_size_continuous(range=c(1, 3),
                                guide=guide_legend(keywidth=0.5, keyheight=0.5, override.aes=list(starshape=15), order=2)) +
          scale_fill_manual(values=c("#D15FEE","#EE6A50","#FFC0CB","#8E8E38","#9ACD32","#006400","#8B4513"),
                            guide="none")+
          scale_starshape_manual(values=c(1, 15),
                                 guide=guide_legend(keywidth=0.5, keyheight=0.5, order=1),
                                 na.translate=FALSE)

p2 <- p1 +new_scale_fill()+ 
          geom_fruit(data=dat2,
                      geom=geom_tile,
                      mapping=aes(y=ID, x=Pos, fill=Type),
                      offset=0.08,
                      pwidth=0.25) +
          scale_fill_manual(values=c("#339933", "#dfac03"),
                            guide=guide_legend(keywidth=0.5, keyheight=0.5, order=3)) +
          geom_axis_text(angle=-45, hjust=0)

p3 <- p2 + new_scale_fill()+
           geom_fruit(data=dat3,
                       geom=geom_tile,
                       mapping=aes(y=ID, x=Type2, alpha=Alpha, fill=Type2),
                       pwidth=0.15)+
          scale_fill_manual(values=c("#b22222", "#005500", "#0000be", "#9f1f9f"),
                            guide=guide_legend(keywidth=0.5, keyheight=0.5, order=4)) +
          scale_alpha_continuous(range=c(0, 0.4),
                                guide=guide_legend(keywidth=0.5, keyheight=0.5, order=5)) +
          geom_axis_text(angle=-45, hjust=0)

p4 <- p3 + new_scale_fill()+
           geom_fruit(data=dat1,
                       geom=geom_bar,
                       mapping=aes(y=ID, x=Abundance, fill=Location),
                       pwidth=0.4,
                       stat="identity",
                       orientation="y")+
           geom_axis_text(angle=-45, hjust=0) +
           scale_fill_manual(values=c("#D15FEE","#EE6A50","#FFC0CB","#8E8E38","#9ACD32","#006400","#8B4513"),
                             guide=guide_legend(keywidth=0.5, keyheight=0.5, order=6)) +
           theme(legend.position=c(0.96, 0.5),
                 legend.background=element_rect(fill=NA),
                 legend.title=element_text(size=7),
                 legend.text=element_text(size=6),
                 legend.spacing.y = unit(0.02, "cm"))
p4
```



# :sparkling_heart: Contributing

We welcome any contributions! By participating in this project you agree to abide
by the terms outlined in the [Contributor Code of Conduct](CONDUCT.md).

Owner

  • Name: Bioinformatics Group @ SMU
  • Login: YuLab-SMU
  • Kind: organization
  • Email: gcyu1@smu.edu.cn
  • Location: Guangzhou

Research group led by Prof. Guangchuang Yu in School of Basic Medical Sciences, Southern Medical University

GitHub Events

Total
  • Issues event: 1
  • Watch event: 6
  • Issue comment event: 1
  • Push event: 4
  • Fork event: 1
Last Year
  • Issues event: 1
  • Watch event: 6
  • Issue comment event: 1
  • Push event: 4
  • Fork event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 284
  • Total Committers: 7
  • Avg Commits per committer: 40.571
  • Development Distribution Score (DDS): 0.06
Past Year
  • Commits: 14
  • Committers: 3
  • Avg Commits per committer: 4.667
  • Development Distribution Score (DDS): 0.286
Top Committers
Name Email Commits
xiangpin x****n@1****m 267
Nitesh Turaga n****a@g****m 8
Guangchuang Yu g****u@g****m 3
J Wokaty j****y 2
J Wokaty j****y@s****u 2
Chun-Hui Gao g****l@g****m 1
Lori Shepherd l****d@r****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 33
  • Total pull requests: 1
  • Average time to close issues: 21 days
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 29
  • Total pull request authors: 1
  • Average comments per issue: 2.12
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • padingdun833 (3)
  • Tsingsjeen (2)
  • ARise-fox (2)
  • MaximePolicarpo (1)
  • NowakDG (1)
  • g-pacheco (1)
  • RhettRautsaw (1)
  • zhanxw (1)
  • pdhrati02 (1)
  • pgcudahy (1)
  • jsan4christ (1)
  • michoug (1)
  • jonaudet (1)
  • hhollandmoritz (1)
  • xiayh17 (1)
Pull Request Authors
  • gaospecial (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • bioconductor 63,333 total
  • Total dependent packages: 3
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
bioconductor.org: ggtreeExtra

An R Package To Add Geometric Layers On Circular Or Other Layout Tree Of "ggtree"

  • Versions: 5
  • Dependent Packages: 3
  • Dependent Repositories: 0
  • Downloads: 63,333 Total
Rankings
Dependent repos count: 0.0%
Stargazers count: 2.2%
Forks count: 3.9%
Average: 9.0%
Dependent packages count: 11.0%
Downloads: 27.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • ggnewscale * imports
  • ggplot2 * imports
  • ggtree * imports
  • rlang * imports
  • stats * imports
  • tidytree >= 0.3.9 imports
  • utils * imports
  • ggstar * suggests
  • knitr * suggests
  • markdown * suggests
  • patchwork * suggests
  • pillar * suggests
  • prettydoc * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • treeio * suggests