treeio
treeio copied to clipboard
Error while reading mlc file from CODEML
Hello everyone!!
I'm trying to read an mlc file (output from CODEML program) using the read.codeml_mlc
function. However, I'm getting the following error:
tree <- read.codeml_mlc("mlc")
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, 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.
I guess another way to put the question is : to which part of the file is the strsplit(., split = "[[:space:]]")
being applied to? Because that's clearly the part that is wrong with my file.
Thanks in advance for any help that could be provided!!
Hey Mick,
I have the exact same problem :/ Were you able to solve it ?
Thanks in advance,
Max
I actually found the problem I had :
I was trying to follow the tutorial here : https://bioc.ism.ac.jp/packages/3.6/bioc/vignettes/ggtree/inst/doc/treeImport.html So I ran the commands :
mlcfile <- system.file("full_path_to_my_mlc_file", "mlc", package="treeio") mlc <- read.codeml_mlc(mlcfile) mlc
But those were not working. However, this worked :
mlcfile <- read.codeml_mlc("full_path_to_my_mlc_file") mlc
I hope this can help :)
Max