-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintro.qmd
More file actions
45 lines (28 loc) · 3.26 KB
/
Copy pathintro.qmd
File metadata and controls
45 lines (28 loc) · 3.26 KB
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
# Introduction {#sec-introduction}
## Working with phylogenetic trees
When you use a software tool to build, or you otherwise acquire, phylogenetic tree data it will be in a (plain text) file. This file will be in one of a number of more or less cryptic file formats designed for computers and software to read, such as:
- [`newick`](https://en.wikipedia.org/wiki/Newick_format), file ending `.new`, `.nwk`, `.newick`
- [`NEXUS`](https://en.wikipedia.org/wiki/Nexus_file), file ending `.nex`, `.nexus`
- [`phylip`](https://en.wikipedia.org/wiki/PHYLIP), file ending `.phy`, `.phylip`
These files can be cryptic to read, as a human. For example, the first `newick` format file we will work with has these contents (scroll right in the text to see the full dataset):
```text
(((((((A:4,B:4):6,C:5):8,D:6):3,E:21):10,((F:4,G:12):14,H:8):13):13,((I:5,J:2):30,(K:11,L:11):2):17):4,M:56);
```
It is difficult as a human to read a file like this and understand the structure of the tree it describes, so we almost always use computational tools to open these files and visualise the trees they represent.
{#fig-bing-tree width=80%}
### Phylogenetic tree visualisation software
A number of software packages are available to visualise, edit, and refine phylogenetic tree files for reports and publications. Some of these can be downloaded and run on your own computer, such as:
- [`figtree`]() _this is the one I use most often, but it has issues and will be superseded at some point by [`peartree`](https://github.com/artic-network/peartree) - LP_
- [`dendroscope`](https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/dendroscope/)
but the [interactive Tree of Life (iTol)](https://itol.embl.de/) service allows you to visualise and edit trees directly in the browser. If you register and sign in, you can save your trees for future use.
::: { .callout-caution }
In this workshop we will be using the online `iToL` service to visualise and interpret trees.
:::
Traditionally, phylogenetic trees have been visualised using independent software tools like these that are dedicated to phylogenetics, but the `R` software ecosystem is a very powerful tool for computational biology and bioinformatics work, encompassing sequence analysis and genomics, transcriptomic and evolutionary analyses, with excellent visualisation capabilities - including for phylogenetic trees.
As `R` is also a programming language, large parts of the analysis can be automated and made reproducible, which is an advantage over independent tools, and a factor in the growing popularity of this approach. Basic competence and skills in `R` are in high demand in academia and industry.
::: { .callout-note }
You can produce equivalent trees to those you will produce in these exercises using standalone tools like `figtree` and `dendroscope`. Some tree visualisations can only be achieved in specialised packages, or with tools like `ggtree`.
`ggtree` is an `R` package that extends the `ggplot2` data visualisation package to visualise and annotate phylogenetic trees (or any other tree-like structure!).
- [`ggtree` homepage](https://guangchuangyu.github.io/ggtree/)
- [The `ggtree` book](https://yulab-smu.top/treedata-book/)
:::