-
Notifications
You must be signed in to change notification settings - Fork 0
/
tree-refinement.qmd
154 lines (103 loc) · 8.15 KB
/
tree-refinement.qmd
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Refining a Phylogenetic Tree Visualisation
## Introduction
In @sec-making-a-tree you used UniProt, `MUSCLE`, `Simple Phylogeny` and `iTol` to construct a tree from homologues of the BipC effector protein. The tree you generated will have resembled that in @fig-itol-simphy-01, which is a reflection of the data, but is possibly not the most informative tree layout.
![The default BipC tree output from `Simple Phylogeny`, visualised in `iToL`.](assets/images/itol-simphy-01.png){#fig-itol-simphy-01 width=80%}
In this section of the workshop, you will use `iToL`'s tools to make your tree more informative to a reader, using the tree you uploaded at the end of @sec-making-a-tree.
## Re-rooting the tree
The Neighbour-Joining methodology that was used to build the tree in `Simple Phylogeny` assigns a root to the tree, although due to the way the algorithm works, this might not be the true _phylogenetic_ root of the tree. We can inspect the tree without any assumption of root placement by examining the _unrooted_ tree.
::: { .callout-important title="Task" }
**Use `iToL` to see the unrooted layout of your tree.**
:::
::: { .callout-tip collapse="true" }
## I need a hint
You should find what you need in [@sec-itol-visualise](itol-visualisation-1.qmd#unrooted-trees).
:::
::: { .callout-caution collapse="true" }
## Check your result
Your unrooted tree should look something like that in @fig-itol-simphy-unrooted. There are two groups of sequences - one group closely related to each other (short branches) and one that is more diverse (longer branches).
![Unrooted `Simple Phylogeny` tree for BipC generated in `iTol`. There are two groups of sequences - one closely related (on the left), and one more distantly related (on the right)](assets/images/itol-simphy-02.png){#fig-itol-simphy-unrooted}
:::
::: { .callout-note }
The unrooted tree suggests that there might be two distinct groups of sequences, but this information looks to be masked in the default rectangular tree, so we will try re-rooting it for clarity.
:::
A common approach to initial rooting of a tree, where an outgroup was not included in the analysis, is to use _midpoint rooting_. _Midpoint rooting_ assumes that the root of the tree is halfway between the two most distantly-related sequences or species.
::: { .callout-tip collapse="true"}
## Midpoint rooting in `iTol`
To use midpoint rooting in `iTol`
- Select the `Advanced` tab from the control panel
- Click on `Midpoint root` in the `Other functions` section
![`iTol`'s advanced control panel tab](assets/images/itol-control-panel-02.png){#fig-itol-control-advanced width=80%}
:::
::: { .callout-important title="Task" }
**Use `iToL`'s Midpoint Rooting to modify the layout of your tree.**
:::
::: { .callout-caution collapse="true" }
## Check your result
Your midpoint-rooted tree should look something like that in @fig-itol-simphy-midpoint There is a group of recently-diverged sequences (sharing a recent common ancestor with short branches), and a group of more anciently-diverged sequences (sharing a recent common ancestor with longer branches).
![Midpoint-rooted `Simple Phylogeny` tree for BipC generated in `iTol`.](assets/images/itol-simphy-03.png){#fig-itol-simphy-midpoint}
:::
::: { .callout-note }
After midpoint rooting the tree, we might consider that there are two clades of interest - a recently-rooted clade, and a more anciently-rooted clade. It might be worth colouring these sequence groups in the figure, so we can refer a reader to them.
:::
## Highlighting clades
To highlight a clade in `iToL` by changing branch colour and thickness, first select the ancestral branch to a clade **using your mouse**, as in @fig-itol-clade-select.
![Selecting the recently-rooted clade in the `iTol` tree.](assets/images/itol-clade-select.png){#fig-itol-clade-select width=80%}
Then bring up the context menu **by clicking on the branch** and select `Branches -> Whole Clade` to see colour and line thickness options (@fig-itol-clade-context). Set those options to whatever seems like a good visualisation choice for you.
![Selecting clade branch colouring options in the `iToL` context menu](assets/images/itol-clade-context-2.png){#fig-itol-clade-context-2 width=80%}
::: { .callout-important title="Task" }
**Use `iToL`'s formatting options to highlight the more deeply-rooting clade in a way that distinguishes it from the more shallow clade.**
:::
::: { .callout-caution collapse="true" }
## Check your result
The resulting formatted tree should look something like that in @fig-itol-simphy-05.
![The BipC tree with deep- and shallow clades highlighted using `iToL`.](assets/images/itol-simphy-05.png){#fig-itol-simphy-05 width=80%}
:::
## Gene trees and species trees
Any phylogenetic tree we generate reflects only the data used to construct it. If we use sequences corresponding to a single gene or gene product, as we did for BipC, we generate a history **only for that gene/gene product** - this is called a _gene tree_.
::: { .callout-note }
We might assume that genes are transmitted _vertically_ from parent to offspring but, in most life on Earth - i.e. microbial life, genes can also be transmitted _horizontally_ and _recombined_ into a different organism, maybe even a different species.
**We cannot always assume that the history of a gene exactly represents the history of the organism it is currently found in.**
:::
As the history of any particular gene may not be the same as that of the organism it is found in, we have developed alternative approaches to construct _species trees_ that are more reflective of the evolution of the species as a whole. These approaches are out of scope for this workshop, but include:
- whole-genome SNP trees
- multigene phylogenetic trees, essentially averaging over many single gene trees
- where a multigene tree includes every homologous gene across all the organisms involved, it is called a _core gene phylogeny_.
- whole-genome distance measures, like Average Nucleotide Identity (ANI) or digital DNA-DNA hybridisation (dDDH)
::: { .callout-warning }
We would like to know how similar our BipC gene tree is to the known species tree for the organisms represented in it. We can tell which organisms are present in the tree by looking at the annotation label, specifically the final few characters:
- `9BURK`: _B. mayonis_, _B. humptydooensis_, _B. oklahomensis_, _Burkholderia_ sp.
- `BURM7`: _B. mallei_
- `BURM9`: _B. mallei_
- `BURMA`: _B. mallei_
- `BURML`: _B. mallei_
- `BURP0`: _B. pseudomallei_
- `BURP1`: _B. pseudomallei_
- `BURP2`: _B. pseudomallei_
- `BURPS`: _B. pseudomallei_
- `BURP6`: _B. pseudomallei_
- `BURPB`: _B. pseudomallei_
- `BURPE`: _B. pseudomallei_
- `BURTA`: _B. thailandensis_
- `BURTH`: _B. thailandensis_
:::
A core gene tree has been produced for this group of organisms - the _B. pseudomallei_ complex (@Hall2022-pk), and can be seen in @fig-pseudomallei-core.
![Core genome phylogeny of 66 strains in the _B. pseudomallei_ complex. This maximum-likelihood phylogeny was created using core genome SNPs shared by all strains and rooted on _B. ubonensis_ strain MSMB22 as an outgroup](assets/images/pseudomallei_core.jpg){#fig-pseudomallei-core width=80%}
::: { .callout-important title="Discussion questions"}
**Compare the tree in @fig-pseudomallei-core to the tree you have produced from BipC.**
- How are the trees similar?
- How do the trees differ?
**_B. mallei_ (glanders) and _B. pseudomallei_ are the only pathogenic members of the _B. pseudomallei_ complex (@Janesomboon2021-dd). BipC is an effector protein that promotes infection of human and animal hosts.**
- Considered in the context of the core genome tree in @fig-pseudomallei-core, what does your tree suggest about the evolution of BipC?
:::
## Summary
::: { .callout-note title="Well Done!"}
After successfully working through this section you should be able to:
- midpoint root a tree in `iToL`
- colour highlight clades of a tree in `iToL`
- explain the difference between a _gene tree_ and a _species tree_
- compare a gene tree with a species tree to interpret evolutionary history
:::
::: { .callout-important }
**Please complete the workshop by answering the questions below in the formative quiz on MyPlace**
- [MyPlace formative quiz]({{< var myplace.quiz4 >}})
:::