Skip to content

Commit 3e1d0e0

Browse files
authored
Update 1.5.2_Viral_Taxonomy_and_Phylogeny_II.md
1 parent 618dcb9 commit 3e1d0e0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

_episodes/1.5.2_Viral_Taxonomy_and_Phylogeny_II.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ Instead, you could post-process the tree using the `ete3` library in Python.
7979
8080
> ## Exercise - Post-process large tree --> smaller tree
8181
>
82-
> There are a few ways to post-process trees to make them viewable or to highlight our viruses of interest.
83-
> One way would be build a script that takes the input of a single contig and the tree file and pruning the tree around the contig to a certain number of the closest reference viruses. Pruning a tree means only certain clades or leaves are left.
84-
> Instead of pruning, you can also "collapse" clades to make the tree manageable to view. For this, clades are collapsed into a single leaf that replaces them. In very large trees, you will probably encounter large clades that are far away from your sequences of interest that can be collapsed and replace. For this, you might want to give an input of all your viruses of interest.
85-
> The `ete3` library is a really useful resource to process trees.
82+
> There are a few ways to post-process trees to make them viewable or to highlight our viruses of interest.
83+
>
84+
> - One way would be build a script that takes the input of a single contig and the tree file and pruning the tree around the contig to a certain number of the closest reference viruses. Pruning a tree means only certain clades or leaves are left.
85+
> - Instead of pruning, you can also "collapse" clades to make the tree manageable to view. For this, clades are collapsed into a single leaf that replaces them. In very large trees, you will probably encounter large clades that are far away from your sequences of interest that can be collapsed and replace. For this, you might want to give an input of all your viruses of interest.
86+
>
8687
>{: .source}
8788
{: .challenge}
8889
8990
We've built two python scripts using this library to shrink the size of tree outputs. The locations of the tree-pruning scripts will be in your python_scripts directory `python_scripts/1.5_collapse_non_target_clades.py` and `python_scripts/1.5_trim_tree_to_500_neighbors.py`.
91+
9092
`1.5_trim_tree_to_500_neighbors.py` will trim your tree around a contig of your choice. `1.5_collapse_non_target_clades.py` will collapse clades that don't contain viruses from our dataset. These scripts also include a section to generate ITOL annotation files.
9193
9294
> ## python script to trim tree around 1 contig

0 commit comments

Comments
 (0)