venelin / PCMFit

An R-package for maximum likelihood inference of Gaussian phylogenetic models with shifts
https://venelin.github.io/PCMFit
4 stars 3 forks source link

PCMFitMixed :subscript out of bounds #6

Closed Sunkuo-1212 closed 4 years ago

Sunkuo-1212 commented 4 years ago

I tried to running the MGPM Inference using PCMFitMixed function on my Mac,I test the example script onhttps://venelin.github.io/PCMFit/articles/pcmfitmixed.html successfully. I checked that my data format is consistent with the example. The only difference is that I only have one trait data. But there are several kinds of errors when using my data, something like:


Performing ML fit on 'E(tree,90)', partition: (90), mapping: (A)
Error in `[<-`(`*tmp*`, 2, 2, r, value = 4) : subscript out of bounds
ERROR in foreach task: no data.table returned: 
 Error in `[<-`(`*tmp*`, 2, 2, r, value = 4) : subscript out of bounds
Step 2.6 ( 1600146849 ): Preparing allowed model-types for each clade-partition
Error in mapping[[which.min(score)]] : 
  attempt to select less than one element in get1index
venelin commented 4 years ago

My first guess is that not all of your code has been adapted to 1-trait scenario. Did you forget to adapt DefineParameterLimits.R? If you did not, and you cannot find what's wrong, could you, pls, share a code snippet that reproduces the error?

Sunkuo-1212 commented 4 years ago

I have adapted DefineParameterLimits.R, and the error disappeared. Thank you very much!

venelin commented 4 years ago

Great 👌. Closing the issue.