问题描述
我正在尝试为我的生态课制作一个很酷的图形 - 一个展示不同种类微生物如何相互关联的图形。
<phyloxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phyloxml.org" xsi:schemaLocation="http://www.phyloxml.org http://www.phyloxml.org/1.10/phyloxml.xsd">
<phylogeny rooted="false">
<clade>
<clade>
<name>Methanopyri</name>
</clade>
<clade>
<clade>
<name>Methanococci</name>
</clade>
<clade>
<clade>
<clade>
<name>Thermococci</name>
</clade>
<clade>
<name>Thermoplasmata</name>
</clade>
</clade>
<clade>
<clade>
<name>Methanobacteria</name>
</clade>
<clade>
<clade>
<name>Archaeoglobi</name>
</clade>
<clade>
<clade>
<name>Methanomicrobia</name>
</clade>
<clade>
<name>Haloarchaea</name>
</clade>
</clade>
</clade>
</clade>
</clade>
</clade>
</clade>
</phylogeny>
</phyloxml>
使用 Bio
库,我可以制作看起来有点无聊的图形。
from Bio import Phylo
def build_tree(fname: str):
""" build a tree from a file """
tree = Phylo.read(fname,'phyloxml')
return tree
if __name__ == '__main__':
tree = build_tree('microbes.xml')
我得到以下图像:
我更喜欢这样的东西:
我该怎么做呢?我很难找到好的图书馆。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)