YuLab-SMU / treeio

:seedling: Base Classes and Functions for Phylogenetic Tree Input and Output
https://yulab-smu.top/treedata-book/
94 stars 24 forks source link

"elf_dynamic_array_reader.h:61 tag not found" when loading an iqtree file #98

Open vmkalbskopf opened 1 year ago

vmkalbskopf commented 1 year ago

That is the error when I try to load an iqtree file in RStudio. If I try to load it in a base R session, I get this:

` caught segfault address 0x55e30bb1bd18, cause 'memory not mapped'

Traceback: 1: FUN(X[[i]], ...) 2: lapply(STRING, .treeBuild) 3: read.tree(text = treetext) 4: read.iqtree("~/diversity_proj/trees/MLtreewithParts.iqtree") `

and then the R session crashes. I'm running R ver 4.2.1 and treeio v1.22.0

all I typed was: tree = read.iqtree('MLtreewithParts.iqtree') Nothing else is loading in my environment other than treeio. MLtreewithParts.iqtree.txt

brj1 commented 1 year ago

The .iqtree file produced by IQ-Tree is not readable by read.iqtree; read.iqtree takes a newick file as input. There should be a .treefile file in the folder with ''MLtreewithParts.iqtree'. Try opening that file instead:

tree <- read.iqtree('MLtreewithParts.treefile')
vmkalbskopf commented 1 year ago

Yup, that was indeed the issue. You can mark this solved. Perhaps input validation would help future users ;-)