0

I'm trying to read an mlc file (output from CODEML program) using the read.codeml_mlc function from the treeio package, as follows:

library(ggtree)
library(treeio)
tree <- read.codeml_mlc(mlc_file)

However, I'm getting the following error:

Error in strsplit(., split = "[[:space:]]") : non character argument

Does anyone have an idea of what could be wrong? This is an ordinary mlc output from PAML from a free ratio branch model, I have not modified or altered it. However, the error seems to be related to my file, because I have tried running the example from the tutorial (reading the mlc file provided with the package) and it works fine.

Put it some other way: Where does the strsplit function come about when reading the mlc file and what part exactly of the file is it refering to? Maybe knowing that will help solve my problem.

Thanks in advance for any help that could be provided!!

  • Can you make this a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) please – Conor Neilson Mar 27 '20 at 02:56
  • Hi @ConorNeilson! I'm not sure I can make this any more reproducible, since the problem seems to be related with my mlc file and I cannot upload it. The only function I'm running is the `read.codeml_mlc` to read the mlc file, then I get the error. – Miguel_Amaro Mar 27 '20 at 03:06

0 Answers0