data <- readPoMoCountFile(file="data/great_apes_1000.cf", virtualPopulationSize=12, numStates=4)
Message in console:
POSITION: 41275799
State: 6,0,0,0
stringvalue: 6,0,0,0
1 1e-08 1e-08 1e-08 3.34898e-07 2.14335e-05 0.000244141 0.00137174 0.00523278 0.015625 0.0394004 0.0877915 0.177979 0.334898 0.593292 3.34898e-07 2.14335e-05 0.000244141 0.00137174 0.00523278 0.015625 0.0394004 0.0877915 0.177979 0.334898 0.593292 3.34898e-07 2.14335e-05 0.000244141 0.00137174 0.00523278 0.015625 0.0394004 0.0877915 0.177979 0.334898 0.593292 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08
std::bad_alloc
Even though the function does not call an error - when I check the data object, it seems not to have been assigned.
> data
Missing Variable: Variable data does not exist
To make sure that this is not a problem of the provided count file, I created my own little count file for testing, that is much shorter (see attached):
However, I get the same behaviour:
data <- readPoMoCountFile(file="data/my_toy_example.cf", virtualPopulationSize=3, numStates=4)
POSITION: 1
State: 6,0,0,0
stringvalue: 6,0,0,0
1 1e-08 1e-08 1e-08 0.00137174 0.0877915 0.00137174 0.0877915 0.00137174 0.0877915 1e-08 1e-08 1e-08 1e-08 1e-08 1e-08
std::bad_alloc
> data
Missing Variable: Variable data does not exist
To check that my installation of revbayes is functional, I checked whether I can load different data inputs. To do that, I followed the substitution model tutorial. There, loading the data works and I can also access the data object:
data <- readDiscreteCharacterData("data/primates_and_galeopterus_cytb.nex")
Successfully read one character matrix from file 'data/primates_and_galeopterus_cytb.nex'
I am a newcomer to revbayes, so maybe I am missing something obvious. Any help or guidance is greatly appreciated!
Unfortunately, the readPoMoCountFile() function doesn't work in v1.2.4, but it should work if you compile RevBayes from the dev_PoMo_SNP branch. The PoMo tutorial will soon be updated to make this clear.