Error when loading PoMo data

29 views
Skip to first unread message

Sophie Seidel

unread,
Oct 8, 2024, 5:32:25 AM10/8/24
to revbayes-users
Hi everyone,

I am using revbayes v1.2.4 and am following the PoMo tutorial. However, I cannot load the data from the count file using the readPoMoCountFile function. 

When I try to lead the data provided in the tutorial, the data variable remains empty:

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!

my_toy_example.cf

Benjamin Redelings

unread,
Oct 9, 2024, 2:20:42 PM10/9/24
to revbayes-users

Hi Sophie,

Interesting.  I will take a look.  Can you file this as a github issue at https://github.com/revbayes/revbayes/issues?

-BenRI

Sophie Seidel

unread,
Oct 10, 2024, 8:17:17 AM10/10/24
to revbayes-users
For anyone having the same issue:

The response to my issue on github (https://github.com/revbayes/revbayes/issues/563) is:


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.



Reply all
Reply to author
Forward
0 new messages