Skip to content

Commit

Permalink
Merge pull request #4 from shang-hongyun/master
Browse files Browse the repository at this point in the history
fix_readme1020
  • Loading branch information
zhangrengang authored Oct 21, 2024
2 parents 0b557a6 + fc9de41 commit 2c95737
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 32 deletions.
106 changes: 74 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

### Introduction ###
We defined the ILS/IH index to represent the degree of Incomplete lineage sorting (ILS) and introgression (IH) among lineages. This tool can quickly detect and visualize ILS/IH index between lineages of tree results run by ASTRAL option -u 2 or -t -2, with short running time, helping users to preliminatively determine ILS and IH and screen lineages for further analysis.For more details of ILS/IH index, please see 待加.
We defined the ILS/IH index to represent the degree of Incomplete lineage sorting (ILS) and introgression (IH) among lineages. This tool can quickly detect and visualize ILS/IH index between lineages of tree results run by ASTRAL option -u 2 or -t -2, with short running time, helping users to preliminatively determine ILS and IH and screen lineages for further analysis.For more details of ILS/IH index, please see https://www.biorxiv.org/content/10.1101/2024.09.02.610893v1.
Any nodes of phylogenetic tree can be regarded as consisting of two sister groups and one outgroup, and these three lineages can form three topologies q1, q2, q3 (as shown in the figure below),The topology with the highest proportion is denoted as q1. ILS/IH index is calculated based on the number and proportion of these topologies.
![q123](example_data/legend_forintroduce/q123.png)
**Figure. The three topological structures of gene trees** Any combination of three lineages produces three topologies, When the ILS index is at its maximum of 100% and there is no IH, we expect q1 = q2 = q3 = 100%/3. When the IH index reaches 50% and there is no ILS, q1 = q2 = 50% is expected.
Expand Down Expand Up @@ -37,38 +37,9 @@ When runing ASTRAL, please use `-u 2` (for [C++ version](https://github.com/chao
```

The block diagram in PDF shows the ratio of q1, q2 and q3 of nodes. q2 and q3 are topologies that conflict with q1. Higher ILS-i or IH-i represent stronger ILS or IH respectively. In this example, there are strong ILS and IH among Juglans nigra, Juglans mandshurica, and (Juglans regia, Juglans sigillata). Since q2 is much larger than q3, we can roughly infer that there is strong IH from Juglans nigra and Juglans mandshurica to (Juglans regia, Juglans sigillata). There are almost no ILS and IH among Juglans regia, Juglans sigillata and outgroup, and this node can be considered as a well-resolved node. The below is an output figures of Phytop with default parameters:
![bar](example_data/legend_forintroduce/astral.tree.bar.jpg)
![bar](example_data/legend_forintroduce/astral.tree.bar-1.png)
**Figure. Visual result of Phytop on example data with default parameters.** n represents the number of gene trees, P is the p-value of χ2 test to check whether the number of topologies q2 and q3 are equal, ILS-i and IH-i represent the calculated ILS index and IH index respectively, and ILS-e and IH-e represent the proportion of gene tree topological incongruence that can be explained by the ILS and IH, respectively.

Get barcharts with collapse for clades:
```
phytop astral.tree -clades setcladefile -collapse
```
![pie](example_data/legend_forintroduce/astral.tree.bar.collepse.jpg)
**Figure. Visual result of Phytop on example data with collapse for clades.** Juglans regia and Juglans sigillata were collepse for Juglans1

Get barcharts displays a selection of nodes:
```
phytop astral.tree -clades setcladefile -onshow Juglans1
```
![pie](example_data/legend_forintroduce/astral.tree.bar.onshow.jpg)
**Figure. Visual result of Phytop on example data with a subset of nodes.** Only the information about the specified node is displayed

Get barcharts displays a selection of nodes:
```
phytop astral.tree -clades setcladefile -noshow Juglans1
```
![pie](example_data/legend_forintroduce/astral.tree.bar.noshow.jpg)
**Figure. Visual result of Phytop on example data with specified node information not displayed.** The information about the specified node is not displayed

Get piecharts:
```
phytop astral.tree -pie -cp
```
![pie](example_data/legend_forintroduce/astral.tree.pie.jpg)
**Figure. Visual result of Phytop on example data with "-pie -cp" parameters.** In the pie chart, only the proportions of the q1 topologies are shown



### Usage ###
```
Expand Down Expand Up @@ -145,4 +116,75 @@ Output:
Prefix for output [default=None]
-tmp DIR, -tmpdir DIR
Temporary directory [default=tmp]
```
```

Get barcharts with collapse for clades:
```
phytop astral.tree -clades setcladefile -collapse
```
![pie](example_data/legend_forintroduce/astral.tree.bar.collepse-1.png)
**Figure. Visual result of Phytop on example data with collapse for clades.** Juglans regia and Juglans sigillata were collepse for Juglans1

Get barcharts displays a selection of nodes:
```
phytop astral.tree -clades setcladefile -onshow Juglans1
```
![pie](example_data/legend_forintroduce/astral.tree.bar.onshow-1.png)
**Figure. Visual result of Phytop on example data with a subset of nodes.** Only the information about the specified node is displayed

Get barcharts displays a selection of nodes:
```
phytop astral.tree -clades setcladefile -noshow Juglans1
```
![pie](example_data/legend_forintroduce/astral.tree.bar.noshow-1.png)
**Figure. Visual result of Phytop on example data with specified node information not displayed.** The information about the specified node is not displayed

Get piecharts:
```
phytop astral.tree -pie -cp
```
![pie](example_data/legend_forintroduce/astral.tree.pie-1.png)
**Figure. Visual result of Phytop on example data with "-pie -cp" parameters.** In the pie chart, only the proportions of the q1 topologies are shown

Customizing the visualization output:
```
phytop astral.tree -align
```
![pie](example_data/legend_forintroduce/astral.tree_align-1.png)
**Figure. Visual result of Phytop on example data with "-align" parameter.** This parameter can be used to make leaf names aligned.

```
phytop astral.tree -subset Juglans_nigra Juglans_sigillata Juglans_regia
```
![pie](example_data/legend_forintroduce/astral.tree-subset_Juglans_nigraJuglans_sigillataJuglans_regia-1.png)
**Figure. Visual result of Phytop on example data with "-branchsize" parameter. "-branchsize 20" in this example.** This parameter can be used to select subset of leaves.

```
phytop astral.tree -branch_size 20
```
![pie](example_data/legend_forintroduce/astral.tree_branchsize20-1.png)
**Figure. Visual result of Phytop on example data with "-branch_size" parameter. "-branch_size 20" in this example.** This parameter can be used to adjust font size of text in branch.

```
phytop astral.tree -notext
```
![pie](example_data/legend_forintroduce/astral.tree_notext-1.png)
**Figure. Visual result of Phytop on example data with "-notext" parameter.** Use this parameter to make the text of the barplots not display.

```
phytop astral.tree -figsize 1 -fontsize 4
```
![pie](example_data/legend_forintroduce/astral.tree-figsize1-fontsize4-1.png)
**Figure. Visual result of Phytop on example data with "-figsize" and "-fontsize" parameters. "-figsize 1 -fontsize 4" in this example.** These parameters can be used to adjust the image size and font size of the barplots.

```
phytop astral.tree -leaf_size 20
```
![pie](example_data/legend_forintroduce/astral.tree-leaf_size20-1.png)
**Figure. Visual result of Phytop on example data with "-leaf_size". "-leaf_size 20" in this example.** This parameter can be used to adjust font size of font size of leaf names.

```
phytop astral.tree -pie -pie_size 20
```
![pie](example_data/legend_forintroduce/astral.tree-pie-pie_size20-1.png)
**Figure. Visual result of Phytop on example data with "-pie_size". "-pie -pie_size 20" in this example.** This parameter can be used to adjust font size of of piecharts.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file removed example_data/legend_forintroduce/astral.tree.bar.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed example_data/legend_forintroduce/astral.tree.pie.jpg
Binary file not shown.
Binary file removed example_data/legend_forintroduce/astral.tree.pie.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2c95737

Please sign in to comment.