diff --git a/README.md b/README.md index 89609e8..0fdd112 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 ### ``` @@ -145,4 +116,75 @@ Output: Prefix for output [default=None] -tmp DIR, -tmpdir DIR Temporary directory [default=tmp] -``` \ No newline at end of file +``` + +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. diff --git a/example_data/legend_forintroduce/astral.tree-figsize1-fontsize4-1.png b/example_data/legend_forintroduce/astral.tree-figsize1-fontsize4-1.png new file mode 100644 index 0000000..12691cc Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree-figsize1-fontsize4-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree-leaf_size20-1.png b/example_data/legend_forintroduce/astral.tree-leaf_size20-1.png new file mode 100644 index 0000000..4e6e140 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree-leaf_size20-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree-pie-pie_size20-1.png b/example_data/legend_forintroduce/astral.tree-pie-pie_size20-1.png new file mode 100644 index 0000000..cdb88be Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree-pie-pie_size20-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree-subset_Juglans_nigraJuglans_sigillataJuglans_regia-1.png b/example_data/legend_forintroduce/astral.tree-subset_Juglans_nigraJuglans_sigillataJuglans_regia-1.png new file mode 100644 index 0000000..063ec78 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree-subset_Juglans_nigraJuglans_sigillataJuglans_regia-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree.bar-1.png b/example_data/legend_forintroduce/astral.tree.bar-1.png new file mode 100644 index 0000000..98df555 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree.bar-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.collepse-1.png b/example_data/legend_forintroduce/astral.tree.bar.collepse-1.png new file mode 100644 index 0000000..e0bc01a Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree.bar.collepse-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.collepse.jpg b/example_data/legend_forintroduce/astral.tree.bar.collepse.jpg deleted file mode 100644 index 43fe020..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.collepse.jpg and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.collepse.pdf b/example_data/legend_forintroduce/astral.tree.bar.collepse.pdf deleted file mode 100644 index ea798f7..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.collepse.pdf and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.jpg b/example_data/legend_forintroduce/astral.tree.bar.jpg deleted file mode 100644 index 30adaa3..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.jpg and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.noshow-1.png b/example_data/legend_forintroduce/astral.tree.bar.noshow-1.png new file mode 100644 index 0000000..0fc36f4 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree.bar.noshow-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.noshow.jpg b/example_data/legend_forintroduce/astral.tree.bar.noshow.jpg deleted file mode 100644 index 085bab6..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.noshow.jpg and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.noshow.pdf b/example_data/legend_forintroduce/astral.tree.bar.noshow.pdf deleted file mode 100644 index 1e1952d..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.noshow.pdf and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.onshow-1.png b/example_data/legend_forintroduce/astral.tree.bar.onshow-1.png new file mode 100644 index 0000000..17fda79 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree.bar.onshow-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.onshow.jpg b/example_data/legend_forintroduce/astral.tree.bar.onshow.jpg deleted file mode 100644 index f3134a9..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.onshow.jpg and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.onshow.pdf b/example_data/legend_forintroduce/astral.tree.bar.onshow.pdf deleted file mode 100644 index bbf4344..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.onshow.pdf and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.bar.pdf b/example_data/legend_forintroduce/astral.tree.bar.pdf deleted file mode 100644 index 58bb77e..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.bar.pdf and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.pie-1.png b/example_data/legend_forintroduce/astral.tree.pie-1.png new file mode 100644 index 0000000..02e7474 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree.pie-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree.pie.jpg b/example_data/legend_forintroduce/astral.tree.pie.jpg deleted file mode 100644 index f6f5324..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.pie.jpg and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree.pie.pdf b/example_data/legend_forintroduce/astral.tree.pie.pdf deleted file mode 100644 index b5a8d44..0000000 Binary files a/example_data/legend_forintroduce/astral.tree.pie.pdf and /dev/null differ diff --git a/example_data/legend_forintroduce/astral.tree_align-1.png b/example_data/legend_forintroduce/astral.tree_align-1.png new file mode 100644 index 0000000..702621f Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree_align-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree_branchsize20-1.png b/example_data/legend_forintroduce/astral.tree_branchsize20-1.png new file mode 100644 index 0000000..a4678a6 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree_branchsize20-1.png differ diff --git a/example_data/legend_forintroduce/astral.tree_notext-1.png b/example_data/legend_forintroduce/astral.tree_notext-1.png new file mode 100644 index 0000000..ea9cb44 Binary files /dev/null and b/example_data/legend_forintroduce/astral.tree_notext-1.png differ