89个稳定版本
3.6.8 | 2024年5月30日 |
---|---|
3.5.0 | 2024年2月28日 |
3.3.9 | 2023年12月21日 |
3.3.4 | 2023年8月28日 |
1.8.0 | 2021年7月29日 |
#5 in 生物学
4MB
1.5K SLoC
thirdkind
绘制允许1、2或3个协调级别的系统发育树
构建包含事件(丢失、复制、物种形成、转移)的系统发育协调(或不协调)树的SVG表示。
-
输入一个newick或phyloxml文件 -> 树的节点事件的SVG表示
-
输入一个recphyloxml文件 -> 关联物种(或宿主)'上层'树内的基因(或共生体)'下层'树的SVG表示
-
输入一组recphyloxml文件 -> 所有基因(或共生体)'下层'树在关联物种(或宿主)'上层'树中的SVG表示,或仅1个基因树,包含所有基因(或共生体)的转移,允许可视化不同场景或历史中的转移。
-
输入两个嵌套的recphyloxml文件 -> 几个SVG表示,可以显示3级协调(例如基因/共生体/宿主)
主页
主页: https://github.com/simonpenel/thirdkind/wiki
关键词
系统发育、协调树、系统发育树、协调、可视化、svg、recphyloxml、phyloxml、3级协调、基因转移、物种形成、复制、丢失
格式
phyloXML、recPhyloXML、有根的newick(NHX标签将不予考虑)。
图形界面
一个专门用于thirdkind图形界面的Web服务器可供在此处使用:http://thirdkind.univ-lyon1.fr/
2级可视化示例
单个基因与物种树协调
相同的基因协调,但没有物种树
多个基因协调
使用recPhyloXML文件的实际长度
使用“自由生活”的物种
多个 "spTree"
多基因树与冗余转移的协调。仅显示1个基因树和红色转移,透明度根据转移的丰度而定
3级可视化输出示例
示例1
协调的共生树及其相关基因树:[链接](https://raw.githubusercontent.com/simonpenel/thirdkind/abfb9e6a28d03860bea43b52312dc706554fd53d/output_examples/thirdkind_example3_mapped_1.svg)
共生体-宿主协调加上映射的基因转移:[链接](https://raw.githubusercontent.com/simonpenel/thirdkind/abfb9e6a28d03860bea43b52312dc706554fd53d/output_examples/thirdkind_example3_mapped_2.svg)
宿主树及其相关基因树:[链接](https://raw.githubusercontent.com/simonpenel/thirdkind/abfb9e6a28d03860bea43b52312dc706554fd53d/output_examples/thirdkind_example3_mapped_3.svg)
示例2
协调的共生树及其相关基因树:[链接](https://raw.githubusercontent.com/simonpenel/thirdkind/abfb9e6a28d03860bea43b52312dc706554fd53d/output_examples/thirdkind_example4_mapped_1.svg)
共生体-宿主协调加上映射的基因转移:[链接](https://raw.githubusercontent.com/simonpenel/thirdkind/abfb9e6a28d03860bea43b52312dc706554fd53d/output_examples/thirdkind_example4_mapped_2.svg)
宿主树及其相关基因树:[链接](https://raw.githubusercontent.com/simonpenel/thirdkind/abfb9e6a28d03860bea43b52312dc706554fd53d/output_examples/thirdkind_example4_mapped_3.svg)
安装
thirdkind 使用 Rust 编写。代码使用 Cargo 管理,并在 crates.io 上发布。
安装 cargo
curl https://sh.rustup.rs -sSf | sh
或对于 Windows,请参阅 [安装指南](https://doc.rust-lang.net.cn/cargo/getting-started/installation.html)
注意
由于 Rust 尚未包含自己的链接器,构建 thirdkind 需要 C 编译器(如 gcc)作为链接器。如果不是这种情况,则需要安装 Rust 所需的基本构建工具。
sudo apt install build-essential
安装 Cargo 后,只需打开一个新终端并输入
cargo install thirdkind
thirdkind
您也可以从源代码安装。如果您想使用示例,请在此处克隆或下载源代码 [GitHub 仓库](https://github.com/simonpenel/thirdkind) 并输入
cargo build --release
target/release/thirdkind -h
运行二进制文件
读取 Newick、PhyloXML 或 recPhyloXML 文件并创建 SVG。
格式根据文件名猜测(默认为 Newick)
Usage: thirdkind [OPTIONS] --input-file <INPUT_FILE>
Options:
-a, --output-transfer-analysis
Display transfers analysis (with -m and -t options)
-A, --starting-node <STARTING_NODE>
Display transfers starting from this node only
-b, --browser
Open svg in browser
-B, --display-br-length
With option -l, display branch length
-c, --conf-file <CONF_FILE>
Use configuration file
-C, --gene-colors <GENE_COLORS>
Define colors for gene trees. For example: "red,violet,#4A38C4,orange"
-d, --gene-fontsize <GENE_FONTSIZE>
Set font size for gene trees
-D, --species-fontsize <SPECIES_FONTSIZE>
Set font size for species trees
-e, --free-living-sup
"free living" option : nodes associated to FREE_LIVING are drawned in an external tree and superposed in case of multiple genes
-E, --free-living-shi
"free living" option : nodes associated to FREE_LIVING are drawned in an external tree and shifted in case of multiple genes
-f, --input-file <INPUT_FILE>
Input tree file (accepted format: newick, phyloXML, recPhyloXML)
-F, --format <FORMAT>
Force format phyloXML/recPhyloXML
-g, --nested <NESTED>
1st level input file (for example a gene-symbiote file with -f defining a 2nd level symbiote-host file)
-G, --gene-phylo <GENE_PHYLO>
Display the gene number <GENE_PHYLO> in phyloxml style (no species tree)
-H, --height <HEIGHT>
Height: multiply the tree height by factor <HEIGHT>
-i, --internal-gene-node
Display internal gene node names
-I, --internal-species-node
Display internal species node names
-J, --display-transfers-abundance
With option -t, display the abundance of redudant transfers
-k, --symbol-size <SYMBOL_SIZE>
Size of the circles, crosses, squares, etc
-K, --bezier <BEZIER>
Bezier parameter: curvature of the transfers and branches leading to free living organisms
-l, --branch-length <BRANCH_LENGTH>
Use branch length, multiplied by the given factor
-L, --landscape
Display as landscape
-m, --multiple
The input file (-f) is a list of recphyloxml files
-M, --midway
Display duplication node at midway in the branch
-n, --gene-tree-list <GENE_TREE_LIST>
List of the indexes of the gene trees to be displayed. For example: 1,2,6,9. If 0, only the species ('upper') tree is displayed
-N, --ending-node <ENDING_NODE>
Display transfers ending to this node only
-o, --output <OUTPUT>
Set the name of the output file or the prefix of the output files
-O, --optimise
Switching nodes in order to minimise transfer crossings (under development)
-p, --uniform
Species tree uniformisation. All the branches of species have the same width
-q, --node-colors <NODE_COLORS>
Nodes to be coloured : the descendants of each nodes will be drawn with a different colour. For example: "m3,m25,m36"
-Q, --background <BACKGROUND>
Background colour
-r, --ratio <RATIO>
Set the ratio between width of species and gene tree. Default is 1.0, you usualy do not need to change it
-s, --species-only
Display species tree only in phyloxml style
-S, --node-support
Display node support
-t, --threshold <THRESHOLD>
Redudant transfers are displayed as one, with opacity according to abundance and only if abundance is higher than <THRESHOLD>. Only one gene is displayed
-T, --threshold-select <THRESHOLD_SELECT>
With option -t, select the index of the gene to display. If set to 0, no gene is displayed
-u, --threshold-nested <THRESHOLD_NESTED>
With -g, same as -t, but apply to the '-f' input file, and -t will apply to the '-g' file
-U, --threshold-nested-select <THRESHOLD_NESTED_SELECT>
Same as -T with -t, but for -u
-v, --verbose
Verbose mode
-W, --width <WIDTH>
Width: multiply the tree height by factor <WIDTH>
-x, --tidy
Tidy mode (non-layered tidy tree layout)
-X, --tidy-clean
Tidy mode, avoiding leave names superposition
-z, --gene-thickness <GENE_THICKNESS>
Thickness of the gene tree
-Z, --species-thickness <SPECIES_THICKNESS>
Thickness of the species tree
-h, --help
Print help
-V, --version
Print version
Note on -b option : you must set a browser as default application for opening svg file
Note on -g option : this will generate 3-levels reconciliation svg files.
For example you may input a gene-symbiote recphyloxml file with -g and symbiote-host recphyloxml file with -f
The -t/-u options are not totally implemented for the 3-levels reconciliation svg output files.
Note on -x/-X options : the non-layered tidy tree layout is described in :
'van der Ploeg, A. 2014. Drawing non-layered tidy trees in linear time.
Software: Practice and Experience, 44(12): 1467–1484.'
Input format is guessed according to the file name extension:
.phyloxml => phyloXML
.xml => recPhyloxml
.recphyloxml => recPhyloXML
.recPhyloXML => recPhyloXML
.recphylo => recPhyloXML
any other => newick
示例
thirdkind -f recphylo_examples/FAM000297_reconciliated.recphylo -b
thirdkind -f recphylo_examples/concat.xml -b -t 0
thirdkind -f recphylo_examples/hote_parasite_page4_BL.recphylo -b -l 1
thirdkind -f recphylo_examples/testfiles -m -b -t 3 -J
thirdkind -f recphylo_examples/test2/hote_parasite_page2.recphylo -g recphylo_examples/test2/gene_parasite_page2.recphylo -b
thirdkind -f recphylo_examples/test1_mult_parasite/rechp_dtl.recphyloxml -g recphylo_examples/test1_mult_parasite/recgs_mult_host_dtl.recphyloxml -b
thirdkind -f newick_examples/virus.nhx -l 4 -b
thirdkind -f newick_examples/virus.nhx -l 4 -x -b
thirdkind -f newick_examples/virus.nhx -l 4 -X -b
配置文件
您可以使用 -c 选项配置 SVG 的某些功能。
默认值是 "config_default.txt" 文件中的值。
修改默认值并将其保存到 "my_config.txt" 中,然后输入
thirdkind -f recphylo_examples/FAM000600_reconciliated_big.recphylo -c my_config.txt -b
配置文件内容
species_color:pink
species_opacity:0.9
single_gene_color:blue
gene_opacity:0.9
species_police_color:orange
species_police_size:12
gene_police_size:10
bezier:1
使用 API light_phylogeny
thirdkind 使用 light_phylogeny 库
https://github.com/simonpenel/light_phylogeny/wiki
recPhyloXML 文档
请参阅 [recPhyloXML 网站](http://phylariane.univ-lyon1.fr/recphyloxml/)
recPhyloXML 论文:[链接](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6198865/)
phyloXML 文档
请参阅:[phyloXML 网站](http://www.phyloxml.org/)
phyloXML 论文:[链接](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2774328/)
引用
https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btac062/6525213
联系
https://lbbe.univ-lyon1.fr/fr/annuaire-des-membres/penel-simon
许可
CECILL:[链接](https://choosealicense.com/licenses/cecill-2.1/)
依赖
~6-17MB
~255K SLoC