我正在尝试将 Newick 格式的树读入 R。我的树文件如下所示:
("Duplodnaviria":("Heunggongvirae":("Peploviricota":("Herviviricetes":("Herpesvirales":("Alloherpesviridae":(),"Herpesviridae":()))),"Uroviricota":("Caudoviricetes":("Caudovirales":("Herelleviridae":(),"Myoviridae":()))))),"Monodnaviria":("Loebvirae":("Hofneiviricota":("Faserviricetes":("Tubulavirales":("Inoviridae":())))),"Shotokuvirae":("Cossaviricota":("Mouviricetes":("Polivirales":("Bidnaviridae":())),"Papovaviricetes":("Sepolyvirales":("Polyomaviridae":()),"Zurhausenvirales":("Papillomaviridae":())),"Quintoviricetes":("Piccovirales":("Parvoviridae":()))),"Cressdnaviricota":("Arfiviricetes":("Cirlivirales":("Circoviridae":()),"Mulpavirales":("Nanoviridae":())),"Repensiviricetes":("Geplafuvirales":("Geminiviridae":(),"Genomoviridae":()))))),"Riboviria":("Orthornavirae":("Duplornaviricota":("Chrymotiviricetes":("Ghabrivirales":("Megabirnaviridae":(),"Quadriviridae":(),"Totiviridae":())),"Resentoviricetes":("Reovirales":("Reoviridae":())),"Vidaverviricetes":("Mindivirales":("Cystoviridae":()))),"Kitrinoviricota":("Alsuviricetes":("Hepelivirales":("Alphatetraviridae":(),"Benyviridae":(),"Hepeviridae":(),"Matonaviridae":()),"Martellivirales":("Bromoviridae":(),"Closteroviridae":(),"Endornaviridae":(),"Kitaviridae":(),"Mayoviridae":(),"Togaviridae":(),"Virgaviridae":()),"Tymovirales":("Alphaflexiviridae":(),"Betaflexiviridae":(),"Tymoviridae":())),"Flasuviricetes":("Amarillovirales":("Flaviviridae":())),"Magsaviricetes":("Nodamuvirales":("Nodaviridae":())),"Tolucaviricetes":("Tolivirales":("Tombusviridae":()))),"Lenarviricota":("Amabiliviricetes":("Wolframvirales":("Narnaviridae":())),"Howeltoviricetes":("Cryppavirales":("Mitoviridae":())),"Miaviricetes":("Ourlivirales":("Botourmiaviridae":()))),"Negarnaviricota":("Ellioviricetes":("Bunyavirales":("Arenaviridae":(),"Fimoviridae":(),"Hantaviridae":(),"Nairoviridae":(),"Peribunyaviridae":(),"Phenuiviridae":(),"Tospoviridae":())),"Insthoviricetes":("Articulavirales":("Amnoonviridae":(),"Orthomyxoviridae":())),"Milneviricetes":("Serpentovirales":("Aspiviridae":())),"Monjiviricetes":("Mononegavirales":("Bornaviridae":(),"Filoviridae":(),"Nyamiviridae":(),"Paramyxoviridae":(),"Pneumoviridae":(),"Rhabdoviridae":()))),"Pisuviricota":("Duplopiviricetes":("Durnavirales":("Amalgaviridae":(),"Hypoviridae":(),"Partitiviridae":(),"Picobirnaviridae":())),"Pisoniviricetes":("Nidovirales":("Coronaviridae":(),"Mesoniviridae":(),"Roniviridae":(),"Tobaniviridae":()),"Picornavirales":("Caliciviridae":(),"Dicistroviridae":(),"Iflaviridae":(),"Picornaviridae":(),"Secoviridae":()),"Sobelivirales":("Solemoviridae":())),"Stelpaviricetes":("Patatavirales":("Potyviridae":()),"Stellavirales":("Astroviridae":())))),"Pararnavirae":("Artverviricota":("Revtraviricetes":("Blubervirales":("Hepadnaviridae":()),"Ortervirales":("Caulimoviridae":(),"Metaviridae":(),"Pseudoviridae":(),"Retroviridae":()))))),"Varidnaviria":("Bamfordvirae":("Nucleocytoviricota":("Megaviricetes":("Algavirales":("Phycodnaviridae":()),"Imitervirales":("Mimiviridae":()),"Pimascovirales":("Ascoviridae":(),"Iridoviridae":(),"Marseilleviridae":())),"Pokkesviricetes":("Asfuvirales":("Asfarviridae":()),"Chitovirales":("Poxviridae":()))),"Preplasmiviricota":("Maveriviricetes":("Priklausovirales":("Lavidaviridae":())),"Tectiliviricetes":("Rowavirales":("Adenoviridae":()))))));
当我使用 ape::read.tree() 将其读入 R 时,它似乎正确读取了树的结构,但它不导入任何提示标签:
> ape::read.tree(file="res_4.tree")
Phylogenetic tree with 84 tips and 179 internal nodes.
Tip labels:
, , , , , , ...
Unrooted; includes branch lengths.
当我使用 read.newick() 读取时,它不会导入树的结构,虽然它会导入提示标签,但这些提示标签是错误的(很多提示标签是“...icota”或“ ...virales',但每个小费都是一个家族,因此所有小费名称都应以'...idae'结尾)。
> phytools::read.newick(file="res_4.tree")
Read 1 item
Phylogenetic tree with 84 tips and 1 internal nodes.
Tip labels:
"Duplodnaviria", "Herpesviridae", "Uroviricota", "Myoviridae", "Monodnaviria", "Shotokuvirae", ...
Unrooted; includes branch lengths.
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In getEdgeLength(text, i) : NAs introduced by coercion
2: In getEdgeLength(text, i) : NAs introduced by coercion
3: In getEdgeLength(text, i) : NAs introduced by coercion
4: In getEdgeLength(text, i) : NAs introduced by coercion
我尝试过使用 Newick 树(用 ' 替换 ";在 { 和 () 之间切换;复制 + 粘贴而不是作为文件读入等)。Newick 的结构是否存在我遗漏的问题树?
谢谢!