FBD error: java.lang.IllegalArgumentException: Weights vector should have the same length as parameter dimension

88 views
Skip to first unread message

Shanta Hejmadi

unread,
Aug 27, 2022, 2:12:55 PM8/27/22
to beast-users
Hello - 
I am trying to run a Fossilized Birth-Death process BEAST 2.6.4 on the Minnesota Supercomputing Institute (MSI). I've been struggling to get it going and I could use some help. The folks at MSI have added SA and BeastLabs as packages for Beast 2.6.4.  I followed the instructions in FBD Tutorial, replacing all instances of TipDatesRandomWalker with SampledNodeDateRandomWalker  in the .xml file. 
I have tried my .xml file both on MSI and on my advisor's Macintosh, and both produce the same error. My advisor is using BEAST 2.6.6, so I think the problem is in my .xml file.  
Is it immediately obvious what my problem is from the output below? If not I can email my .xml directly. 
Thanks,
Shanta

At the beginning of the output I get this:
File: beast.fbd.15p.0.xml seed: 1661547892897 threads: 1
Package BEASTLabs requires another package BEAST versions 2.6.6 to 2.6.9 but the installed BEAST has version 2.6.4.
Either uninstall BEASTLabs or install the correct version of BEAST.
Unexpected behavior may follow!
Loading package BEAST v2.6.4
Loading package BEAST v2.6.7
Loading package BEASTLabs v1.9.7
Loading package SA v2.0.2
Loading package BEAST v2.6.4
Alignment(beast)
  332 taxa
  49671 sites
  22788 patterns

.
.
.
then it parses all the partitions
.
.
.
Then it does the starting frequencies for all the partitions
.
.
.
It gives the citation information
.
.
.
And then I get this error:
Fatal exception: Weights vector should have the same length as parameter dimension
java.lang.IllegalArgumentException: Weights vector should have the same length as parameter dimension
        at beast.evolution.operators.DeltaExchangeOperator.weights(Unknown Source)
        at beast.evolution.operators.DeltaExchangeOperator.proposal(Unknown Source)
        at beast.core.Operator.proposal(Unknown Source)
        at beast.core.MCMC.propagateState(Unknown Source)
        at beast.core.MCMC.doLoop(Unknown Source)
        at beast.core.MCMC.run(Unknown Source)
        at beast.app.BeastMCMC.run(Unknown Source)
        at beast.app.beastapp.BeastMain.<init>(Unknown Source)
        at beast.app.beastapp.BeastMain.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at beast.app.beastapp.BeastLauncher.run(Unknown Source)
        at beast.app.beastapp.BeastLauncher.main(Unknown Source)
Fatal exception: Weights vector should have the same length as parameter dimension
java.lang.RuntimeException: An error was encounted. Terminating BEAST
        at beast.app.util.ErrorLogHandler.publish(Unknown Source)
        at java.util.logging.Logger.log(Logger.java:738)
        at java.util.logging.Logger.doLog(Logger.java:765)
        at java.util.logging.Logger.log(Logger.java:788)
        at java.util.logging.Logger.severe(Logger.java:1464)
        at beast.app.beastapp.BeastMain.<init>(Unknown Source)
        at beast.app.beastapp.BeastMain.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at beast.app.beastapp.BeastLauncher.run(Unknown Source)
        at beast.app.beastapp.BeastLauncher.main(Unknown Source)



Shanta Hejmadi

unread,
Aug 28, 2022, 4:00:54 PM8/28/22
to beast-users
After a little more searching, I found this thread which seems to explain what the issue is, and sure enough, I had extra  "id=FixMeanMutationRatesOperator". They were in the 6 partitions where I had invariant sites as part of the site model. Or rather, they are in the 2nd through 6th partitions with +I, since the first one didn't cause any error. Interestingly, these 6 partitions have different substitution models. 6 have GTR+G, 1 has HKY +G, and 1 has SYM + G.  I've also got both "empirical" and "all equal" base frequencies within this set of 6 partitions. They all 6 have 4 Gamma categories, but I have other partitions with 4 gamma categories that didn't have this problem. The common thread seems to be the +I. 
I'm now having a different problem which I  need to troubleshoot a bit more before I send a message to the google group - I was probably screwing something up because I was tired.  But in any case, I thought this might help figure out why Beauti is doing the weird thing from this and the original thread.
Shanta 

Shanta Hejmadi

unread,
Aug 29, 2022, 2:26:34 PM8/29/22
to beast-users
Final update here - I started over with my alignment making a brand new Beauti file, 
  • followed all the tutorial instructions about editing the .xml to take care of the  TipDatesRandomWalker  operators that needed to be changed to SampledNodeDateRandomWalker 
  • Searched for the id="FixMeanMutationRatesOperator", and this time found only one instance of it, (Hooray!!)
  • The file runs perfectly.  
I'm still not sure why Beauty 2.6.4 was adding those extra FixMeanMutationRatesOperator from my previous post, but hopefully my post from 8/28 can help debug that for future versions. 
Shanta

Reply all
Reply to author
Forward
0 new messages