treeio icon indicating copy to clipboard operation
treeio copied to clipboard

Error while reading mlc file from CODEML

Open MickAmest opened this issue 4 years ago • 2 comments

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!!

MickAmest avatar Mar 26 '20 19:03 MickAmest

Hey Mick,

I have the exact same problem :/ Were you able to solve it ?

Thanks in advance,

Max

MaximePolicarpo avatar May 08 '23 11:05 MaximePolicarpo

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

MaximePolicarpo avatar May 08 '23 11:05 MaximePolicarpo