I'm trying to read an mlc file (output from CODEML program) using the read.codeml_mlc function from the treeio package in R, as follows:
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 referring to? Maybe knowing that will help solve my problem.
Thanks in advance for any help that could be provided!!
Hello Fatima! You're right, there is a problem with my mlc output file. For some reason, it does not contain the elements that indicate the branch and node numbers, so I guess the solution is fixing that from PAML and then trying treeio again! Thanks so much!!
Dear Sir,
Have you solved this problem, kindly let me know how can I amend the mlc file in order to read by treeio.
Thnaks
Hello,
I have run into the same issue trying to read example input mlc file from the source you provided. I simply took the example mlc file from the source and saved it as "example.mlc". Here is my command
mlcfile <- system.file("Users/Documents/ACE_PAML_analysis/", "example.mlc", package="treeio")
. The command returns a n empty data file shown as " " in my R environment. Am I using the the example command correctly? Any guidance is greatly appreciated. Thank you.