treeio icon indicating copy to clipboard operation
treeio copied to clipboard

treeio read tree files form nexus format with extra quotation marks

Open wook2014 opened this issue 4 years ago • 3 comments

Dear @GuangchuangYu I recently use ggtree to process my phylogenetic tree. I obtained the tree file through IQTree and exported the file in nexus format by figtree. But I meet up with a bug with groupOTU which confused me for a long time. I found the reason is that treeio read the qutoation marks in the nexus file which lead to the group information can not match the sequence names in tree object. I am writing to report this problem and I am wondering if the problem can be fixed. wuke

wook2014 avatar Mar 02 '21 10:03 wook2014

pls provide a reproducible example.

GuangchuangYu avatar Mar 03 '21 01:03 GuangchuangYu

pls provide a reproducible example.

I attached one example file here, but this problem does not just appeared here. This file have problem with double quotation marks. I guess this is because NEXUS file format have too much freedom in Taxa block and the error occurs when read information from Taxa block.

treefile.nexus.txt

wook2014 avatar Mar 04 '21 11:03 wook2014

@xiangpin pls test reading the file with read.beast.

@wook2014 you would better provide source code to reproduce the issue of groupOTU which you mentioned previously.

GuangchuangYu avatar Mar 08 '21 02:03 GuangchuangYu