使用0和1从dataframe创建newick格式
我有一个这样的数据帧(1表示变异存在,0表示不存在) 我想用它做一个系统发育树 (树的每一端将是a、b、c、d、e,树的长度将是累积的突变数。) 在制作数据帧之前,我知道必须将数据转换为Newick格式 有python(或R)工具吗 多谢各位 *我看过问答 但我不明白使用0和1从dataframe创建newick格式,dataframe,tree,phylogeny,Dataframe,Tree,Phylogeny,我有一个这样的数据帧(1表示变异存在,0表示不存在) 我想用它做一个系统发育树 (树的每一端将是a、b、c、d、e,树的长度将是累积的突变数。) 在制作数据帧之前,我知道必须将数据转换为Newick格式 有python(或R)工具吗 多谢各位 *我看过问答 但我不明白 a b c d e mut1 1 1 1 1 1 mut2 1 1 1 0 0 mut3 1 0 0 0 0 mut4 0 0 0 1 1 ....
a b c d e
mut1 1 1 1 1 1
mut2 1 1 1 0 0
mut3 1 0 0 0 0
mut4 0 0 0 1 1
....