-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.Rmd
117 lines (96 loc) · 5.75 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
output:
md_document:
variant: gfm
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# ggtreeExtra: Compact visualization of richly annotated phylogenetic data
If you use this work in published research, please cite:
__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__<sup>\*</sup>. 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).
This repo contains source code and data to produce <!--Manuscript and-->Supplementary Material of the above paper.
+ rawdata: contains `HMP_tree`, `kegg` and `PhyloPhlAn`, downloaded from the examples of [GraPhlAn](https://github.com/biobakery/graphlan/tree/master/examples), and the `Methanotroph`, downloaded from the [repo](https://github.com/TheWrightonLab/Methanotroph_rpS3Analyses_SmithWrighton2018).
+ scripts: contains the script to produce the dataset of `data` using the data set of `rawdata`.
+ data: contains all the data sets that used to generate figures in Supplemental file.
+ Rmarkdown: contains the source code to produce Supplementary File.
## Dependencies and locations
<!-- - GNU Make should be located in the user’s PATH -->
<!-- - Python (2 or 3) should be installed and located in the user’s PATH -->
<!--and `Biopython` also should be installed. -->
+ R (>= 4.0.3) should be installed and located in the user's PATH, and the following packages should be installed.
- `ggtreeExtra` : `BiocManager::install("ggtreeExtra")`
- `ggtree` : `BiocManager::install("ggtree")`
- `treeio` : `BiocManager::install("treeio")`
- `tidytree` : `install.packages("tidytree")`
- `ggplot2` : `install.packages("ggplot2")`
- `kableExtra` : `install.packages("kableExtra")`
- `bookdown` : `install.package("bookdown")`
- `MicrobiotaProcess` : `BiocManager::install("MicrobiotaProcess")`
- `ggstar` : `install.packages("ggstar")`
- `Cairo` : `install.packages("Cairo")`
- `aplot` : `install.packages("aplot")`
- `patchwork` : `install.packages("patchwork")`
- `ggnewscale` : `install.packages("ggnewscale")`
- `knitr` : `install.packages("knitr")`
- `ggpp` : `install.packages("ggpp")`
- [`ggpattern`](https://github.com/coolbutuseless/ggpattern) : `remotes::install_github("coolbutuseless/ggpattern")`
- `tibble` : `install.packages("tibble")`
- `tidyr` : `install.packages("tidyr")`
- `dplyr` : `install.packages("dplyr")`
- `ggimage` : `install.packages("ggimage")`
- `ggridges` : `install.packages("ggridges")`
```{r, message=FALSE, echo=FALSE, setup}
library(ggtreeExtra)
library(ggstar)
library(ggplot2)
library(ggtree)
library(treeio)
library(tidytree)
library(ggnewscale)
library(MicrobiotaProcess)
library(aplot)
library(kableExtra)
library(Cairo)
library(patchwork)
library(knitr)
library(ggpattern)
library(ggpp)
library(ggridges)
library(tidyr)
library(dplyr)
library(tibble)
library(ggimage)
```
To compile the <!-- Rmarkdown/manuscript.docx and --> Rmarkdown/[supplemental_file.pdf](Rmarkdown/supplementary_file.pdf), please run the following command on terminal.
<!-- ```r
make manuscript && make supple
``` -->
```bash
Rscript -e 'rmarkdown::render("./Rmarkdown/supplementary_file.Rmd")'
```
Or run the following command in R.
```r
rmarkdown::render("./Rmarkdown/supplementary_file.Rmd")
```
Here is the output of `sessionInfo()` of the system on which [the Supplemental file](Rmarkdown/supplementary_file.pdf) was compiled:
```{r, echo=FALSE}
sessionInfo()
```
## Docker image
We also provided a [docker image](https://hub.docker.com/r/xushuangbin/ggtreeextraarticleenv) to help users to build the computing environment. You can pull and run it according to the following commands.
- Install Docker (https://www.docker.com/)
- `sudo apt-get install docker.io` (Ubuntu)
- Pull the Docker image from Docker Hub:
- `docker pull xushuangbin/ggtreeextraarticleenv:latest`
- or
- `sudo pull xushuangbin/ggtreeextraarticleenv:latest`
- Run the image:
- `docker run -e PASSWORD=yourpassword -p 8787:8787 xushuangbin/ggtreeextraarticleenv`
- or
- `sudo docker run -e PASSWORD=yourpassword -p 8787:8787 xushuangbin/ggtreeextraarticleenv`
- Log in to RStudio at [http://localhost:8787](http://localhost:8787) using username `rstudio` and password `yourpassword`. For Windows users, you also need to provide your IP address, you can find it using `docker-machine ip default`.
+ Inside the RStudio, run:
`browseVignettes(package = "ggtreeExtraArticleEnv")`
- You can click one of the links: "PDF", "source", "R code"
- In case of `The requested page was not found` error, try add 'help/' in front of the hostname in the URL (this is a known bug):
http://localhost:8787/help/library/ggtreeExtraArticleEnv/doc/supplementary_file.pdf