beast-dev / beast-mcmc

Bayesian Evolutionary Analysis Sampling Trees
http://beast.community
GNU Lesser General Public License v2.1
189 stars 72 forks source link

BSSVS example does not work #807

Closed ericenns closed 8 years ago

ericenns commented 8 years ago

I have tried following the BSSVS example available here

And I get the following errors:

dr.xml.XMLParseException: The '<bitFlipInSubstitutionModelOperator>' element with id, 'null', is incorrectly constructed.
The following was expected:
Exactly one ELEMENT of type BayesianStochasticSearchVariableSelection REQUIRED
        at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.parse(Unknown Source)
        at dr.app.beast.BeastMain.<init>(Unknown Source)
        at dr.app.beast.BeastMain.main(Unknown Source)
May 17, 2016 9:02:48 AM dr.app.beast.BeastMain <init>
SEVERE: Parsing error - poorly formed BEAST file, H5N1_HA_discrete.xml:
The '<bitFlipInSubstitutionModelOperator>' element with id, 'null', is incorrectly constructed.
The following was expected:
Exactly one ELEMENT of type BayesianStochasticSearchVariableSelection REQUIRED
java.lang.RuntimeException: Terminate
        at dr.app.beast.BeastMain.<init>(Unknown Source)
        at dr.app.beast.BeastMain.main(Unknown Source)

Any advice:

maxbiostat commented 8 years ago

Hey,

It'd be helpful to know

$ beast -version
ericenns commented 8 years ago

I am using the latest version of BEAST 1.8.3

I am trying to run the xml file provided in the example of the link above.

So this one here, with the sections uncommented as guided by the example.

msuchard commented 8 years ago

@ericenns, try rerun with BEAGLE enabled. If you are still having trouble, please post the entire BEAST screen output.

ericenns commented 8 years ago

Using the following file:

H5N1_HA_discrete.xml.zip

This is the file from the example I had to change lines 953 and 956 to set dimension to 20 instead of 21 as in the example file as that was throwing an error.

With Beagle:

$ java -Djava.library.path=/home/ericenns/lib -jar BEASTv1.8.3/lib/beast.jar H5N1_HA_discrete.xml 

                  BEAST v1.8.3, 2002-2016
       Bayesian Evolutionary Analysis Sampling Trees
                 Designed and developed by
   Alexei J. Drummond, Andrew Rambaut and Marc A. Suchard

               Department of Computer Science
                   University of Auckland
                  alexei@cs.auckland.ac.nz

             Institute of Evolutionary Biology
                  University of Edinburgh
                     a.rambaut@ed.ac.uk

              David Geffen School of Medicine
           University of California, Los Angeles
                     msuchard@ucla.edu

                Downloads, Help & Resources:
                        http://beast.bio.ed.ac.uk

Source code distributed under the GNU Lesser General Public License:
                http://github.com/beast-dev/beast-mcmc

                     BEAST developers:
        Alex Alekseyenko, Guy Baele, Trevor Bedford, Filip Bielejec, Erik Bloomquist, Matthew Hall,
        Joseph Heled, Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
        Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
                Oliver Pybus, Chieh-Hsi Wu, Walter Xie

                         Thanks to:
        Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Using BEAGLE library v2.1.2 for accelerated, parallel likelihood evaluation
2009-2013, BEAGLE Working Group - http://beagle-lib.googlecode.com/
Citation: Ayres et al (2012) Systematic Biology 61: 170-173 | doi:10.1093/sysbio/syr100

Random number seed: 1463587958017

Failed to load parser: dr.inferencexml.trace.GeneralizedHarmonicMeanAnalysisParser
line = dr.inferencexml.trace.GeneralizedHarmonicMeanAnalysisParser

Loading additional development parsers from development_parsers.properties, which is additional set of parsers only available for development version ...

WARNING: parser - dr.inferencexml.model.DifferenceParameterParser in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

WARNING: parser - dr.inferencexml.model.SumParameterParser in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

WARNING: parser - dr.evomodelxml.operators.SubtreeJumpOperatorParser in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

Failed to load parser: dr.evomodel.treelikelihood.RootDiscreteStateStatistic
line = dr.evomodel.treelikelihood.RootDiscreteStateStatistic

Failed to load parser: dr.evomodel.epidemiology.casetocase.operators.InfectionBranchGibbsOperator
line = dr.evomodel.epidemiology.casetocase.operators.InfectionBranchGibbsOperator

WARNING: parser - dr.app.beagle.multidimensionalscaling.MultiDimensionalScalingLikelihood in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

Parsing XML file: H5N1_HA_discrete.xml
  File encoding: UTF8
Looking for plugins in /home/ericenns/beast_1.8.3_test/plugins
Read alignment: alignment
  Sequences = 98
      Sites = 1698
   Datatype = nucleotide
Site patterns 'patterns' created from positions 1-1698 of alignment 'alignment'
  unique pattern count = 464
Read attribute patterns, 'geoPatterns' for attribute, location
Creating Jukes-Cantor distance matrix
Creating the tree model, 'treeModel'
  initial tree topology =((((((((((((((((((A_HongKong_486_1997,A_chicken_HongKong_915_1997),A_HongKong_488_1997),A_HongKong_516_1997),A_Duck_HongKong_p46_1997),A_Goose_HongKong_w355_1997),A_HongKong_538_1997),A_HongKong_507_1997),A_HongKong_97_1998),A_HongKong_156_1997),A_HongKong_481_1997),(((((A_HongKong_491_1997,A_HongKong_542_1997),A_HongKong_503_1997),A_Chicken_HongKong_728_1997),A_HongKong_532_1997),(((A_Chicken_HongKong_220_1997,A_chicken_HongKong_258_1997),A_HongKong_483_1997),A_HongKong_485_1997))),A_HongKong_514_1997),((A_duck_Fujian_19_2000,A_duck_Guangdong_12_2000),A_Goose_Guangdong_1_1996)),A_duck_Guangxi_07_1999),((((((((((((A_chicken_Hebei_718_2001,A_duck_Guangxi_35_2001),(A_duck_Fujian_17_2001,A_duck_Guangdong_01_2001)),(A_duck_Guangdong_07_2000,A_duck_Guangdong_40_2000)),A_duck_Guangxi_22_2001),A_duck_Guangdong_22_2002),(A_chicken_Henan_01_2004,A_swine_Fujian_F1_2001)),(((A_blackbird_Hunan_1_2004,A_treesparrow_Henan_4_2004),A_treesparrow_Henan_3_2004),A_treesparrow_Henan_1_2004)),((((A_Ck_HK_619_2002,A_chicken_HongKong_863_2002),A_duck_Guangxi_50_2001),((A_HongKong_213_2003,A_egret_HongKong_7572_2003),A_duck_HongKong_821_2002)),((A_chicken_jiyuan_1_2003,A_chicken_zhengzhou_1_2002),A_chicken_Guangdong_174_2004))),A_duck_Shantou_4610_2003),((((A_duck_Fujian_01_2002,A_duck_Fujian_13_2002),A_chicken_Hebei_108_2002),A_chicken_zhoukou_2_2002),A_duck_Guangxi_53_2002)),(((A_chicken_Fujian_1042_2005,A_duck_Fujian_897_2005),A_Goose_Shantou_1621_2005),A_goose_Shantou_2216_2005)),A_duck_Guangdong_173_2004)),(A_chicken_Hebei_326_2005,A_treesparrow_Henan_2_2004)),(((((((((A_duck_Guangxi_351_2004,A_duck_Guangxi_380_2004),A_chicken_Guangdong_178_2004),(A_greyheron_HongKong_728_2004,A_greyheron_HongKong_837_2004)),((A_chicken_Guangxi_604_2005,A_duck_Guangxi_793_2005),A_quail_Guangxi_575_2005)),(((A_chicken_Guangxi_2448_2004,A_chicken_Guangxi_2461_2004),(A_duck_Hunan_1265_2005,A_duck_Hunan_1608_2005)),(A_duck_Guangxi_951_2005,A_goose_Guangxi_345_2005))),(A_Chicken_Shantou_810_2005,A_Quail_Shantou_911_2005)),A_chicken_Guangdong_191_2004),A_Duck_Fujian_1734_2005),((((A_chicken_Hunan_999_2005,A_duck_Hunan_182_2005),A_duck_Hunan_139_2005),(A_duck_Hunan_127_2005,A_duck_Hunan_152_2005)),A_duck_Hunan_157_2005))),(((((((((A_duck_Guangxi_1586_2004,A_duck_Guangxi_1681_2004),A_duck_Guangxi_1311_2004),A_duck_Guangxi_1793_2004),(A_goose_Guangxi_1097_2004,A_goose_Guangxi_1832_2004)),A_goose_Guangxi_2112_2004),(A_duck_Guangxi_2396_2004,A_goose_Guangxi_2383_2004)),A_duck_Guangxi_2291_2004),A_chicken_Gu    angxi_2439_2004),(A_duck_
Guangxi_1378_2004,A_goose_Guangxi_914_2004)))
  tree height = 9.00012400328392
Using discretized relaxed clock model.
  over sampling = 1
  parametric model = logNormalDistributionModel
   rate categories = 194
Creating state frequencies model 'hky.frequencies': Using empirical frequencies from data = {0.34814, 0.18686, 0.22972, 0.23528}
Creating HKY substitution model. Initial kappa = 1.0
Creating site model: 
  4 category discrete gamma with initial shape = 0.5
Using BEAGLE TreeLikelihood
  Branch rate model used: discretizedBranchRates
  Using BEAGLE resource 0: CPU
    with instance flags:  PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL SCALING_MANUAL SCALERS_RAW VECTOR_SSE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU
  Ignoring ambiguities in tree likelihood.
  With 464 unique site patterns.
  Using rescaling scheme : dynamic (rescaling every 100 evaluations)
Creating state frequencies model 'geoFreqs.frequencies': Initial frequencies = {0.14286, 0.14286, 0.14286, 0.14286, 0.14286, 0.14286, 0.14286}
  General Substitution Model (stateCount=7)
  Rates relative to Fujian<->Guangdong
Fatal exception: Length of dimension name array doesn't match the number of dimensions
java.lang.IllegalArgumentException: Length of dimension name array doesn't match the number of dimensions
        at dr.inference.model.Parameter$Abstract.setDimensionNames(Unknown Source)
        at dr.app.beagle.evomodel.substmodel.GeneralSubstitutionModel.setupDimensionNames(Unknown Source)
        at dr.app.beagle.evomodel.substmodel.GeneralSubstitutionModel.<init>(Unknown Source)
        at dr.app.beagle.evomodel.substmodel.GeneralSubstitutionModel.<init>(Unknown Source)
        at dr.app.beagle.evomodel.parsers.GeneralSubstitutionModelParser.parseXMLObject(Unknown Source)
        at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.parse(Unknown Source)
        at dr.app.beast.BeastMain.<init>(Unknown Source)
        at dr.app.beast.BeastMain.main(Unknown Source)
java.lang.RuntimeException: Terminate
        at dr.app.beast.BeastMain.<init>(Unknown Source)
        at dr.app.beast.BeastMain.main(Unknown Source)

Without Beagle:

$ java -jar BEASTv1.8.3/lib/beast.jar -beagle_off H5N1_HA_discrete.xml 

                  BEAST v1.8.3, 2002-2016
       Bayesian Evolutionary Analysis Sampling Trees
                 Designed and developed by
   Alexei J. Drummond, Andrew Rambaut and Marc A. Suchard

               Department of Computer Science
                   University of Auckland
                  alexei@cs.auckland.ac.nz

             Institute of Evolutionary Biology
                  University of Edinburgh
                     a.rambaut@ed.ac.uk

              David Geffen School of Medicine
           University of California, Los Angeles
                     msuchard@ucla.edu

                Downloads, Help & Resources:
                        http://beast.bio.ed.ac.uk

Source code distributed under the GNU Lesser General Public License:
                http://github.com/beast-dev/beast-mcmc

                     BEAST developers:
        Alex Alekseyenko, Guy Baele, Trevor Bedford, Filip Bielejec, Erik Bloomquist, Matthew Hall,
        Joseph Heled, Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
        Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
                Oliver Pybus, Chieh-Hsi Wu, Walter Xie

                         Thanks to:
        Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Random number seed: 1463588388373

Failed to load parser: dr.inferencexml.trace.GeneralizedHarmonicMeanAnalysisParser
line = dr.inferencexml.trace.GeneralizedHarmonicMeanAnalysisParser

Loading additional development parsers from development_parsers.properties, which is additional set of parsers only available for development version ...

WARNING: parser - dr.inferencexml.model.DifferenceParameterParser in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

WARNING: parser - dr.inferencexml.model.SumParameterParser in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

WARNING: parser - dr.evomodelxml.operators.SubtreeJumpOperatorParser in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

Failed to load parser: dr.evomodel.treelikelihood.RootDiscreteStateStatistic
line = dr.evomodel.treelikelihood.RootDiscreteStateStatistic

Failed to load parser: dr.evomodel.epidemiology.casetocase.operators.InfectionBranchGibbsOperator
line = dr.evomodel.epidemiology.casetocase.operators.InfectionBranchGibbsOperator

WARNING: parser - dr.app.beagle.multidimensionalscaling.MultiDimensionalScalingLikelihood in development_parsers.properties is duplicated, which is REPLACING the same parser loaded previously.

Parsing XML file: H5N1_HA_discrete.xml
  File encoding: UTF8
Looking for plugins in /home/ericenns/beast_1.8.3_test/plugins
Read alignment: alignment
  Sequences = 98
      Sites = 1698
   Datatype = nucleotide
Site patterns 'patterns' created from positions 1-1698 of alignment 'alignment'
  unique pattern count = 464
Read attribute patterns, 'geoPatterns' for attribute, location
Creating Jukes-Cantor distance matrix
Creating the tree model, 'treeModel'
  initial tree topology = ((((((((((((((((((A_HongKong_486_1997,A_chicken_HongKong_915_1997),A_HongKong_488_1997),A_HongKong_516_1997),A_Duck_HongKong_p46_1997),A_Goose_HongKong_w355_1997),A_HongKong_538_1997),A_HongKong_507_1997),A_HongKong_97_1998),A_HongKong_156_1997),A_HongKong_481_1997),(((((A_HongKong_491_1997,A_HongKong_542_1997),A_HongKong_503_1997),A_Chicken_HongKong_728_1997),A_HongKong_532_1997),(((A_Chicken_HongKong_220_1997,A_chicken_HongKong_258_1997),A_HongKong_483_1997),A_HongKong_485_1997))),A_HongKong_514_1997),((A_duck_Fujian_19_2000,A_duck_Guangdong_12_2000),A_Goose_Guangdong_1_1996)),A_duck_Guangxi_07_1999),((((((((((((A_chicken_Hebei_718_2001,A_duck_Guangxi_35_2001),(A_duck_Fujian_17_2001,A_duck_Guangdong_01_2001)),(A_duck_Guangdong_07_2000,A_duck_Guangdong_40_2000)),A_duck_Guangxi_22_2001),A_duck_Guangdong_22_2002),(A_chicken_Henan_01_2004,A_swine_Fujian_F1_2001)),(((A_blackbird_Hunan_1_2004,A_treesparrow_Henan_4_2004),A_treesparrow_Henan_3_2004),A_treesparrow_Henan_1_2004)),((((A_Ck_HK_619_2002,A_chicken_HongKong_863_2002),A_duck_Guangxi_50_2001),((A_HongKong_213_2003,A_egret_HongKong_7572_2003),A_duck_HongKong_821_2002)),((A_chicken_jiyuan_1_2003,A_chicken_zhengzhou_1_2002),A_chicken_Guangdong_174_2004))),A_duck_Shantou_4610_2003),((((A_duck_Fujian_01_2002,A_duck_Fujian_13_2002),A_chicken_Hebei_108_2002),A_chicken_zhoukou_2_2002),A_duck_Guangxi_53_2002)),(((A_chicken_Fujian_1042_2005,A_duck_Fujian_897_2005),A_Goose_Shantou_1621_2005),A_goose_Shantou_2216_2005)),A_duck_Guangdong_173_2004)),(A_chicken_Hebei_326_2005,A_treesparrow_Henan_2_2004)),(((((((((A_duck_Guangxi_351_2004,A_duck_Guangxi_380_2004),A_chicken_Guangdong_178_2004),(A_greyheron_HongKong_728_2004,A_greyheron_HongKong_837_2004)),((A_chicken_Guangxi_604_2005,A_duck_Guangxi_793_2005),A_quail_Guangxi_575_2005)),(((A_chicken_Guangxi_2448_2004,A_chicken_Guangxi_2461_2004),(A_duck_Hunan_1265_2005,A_duck_Hunan_1608_2005)),(A_duck_Guangxi_951_2005,A_goose_Guangxi_345_2005))),(A_Chicken_Shantou_810_2005,A_Quail_Shantou_911_2005)),A_chicken_Guangdong_191_2004),A_Duck_Fujian_1734_2005),((((A_chicken_Hunan_999_2005,A_duck_Hunan_182_2005),A_duck_Hunan_139_2005),(A_duck_Hunan_127_2005,A_duck_Hunan_152_2005)),A_duck_Hunan_157_2005))),(((((((((A_duck_Guangxi_1586_2004,A_duck_Guangxi_1681_2004),A_duck_Guangxi_1311_2004),A_duck_Guangxi_1793_2004),(A_goose_Guangxi_1097_2004,A_goose_Guangxi_1832_2004)),A_goose_Guangxi_2112_2004),(A_duck_Guangxi_2396_2004,A_goose_Guangxi_2383_2004)),A_duck_Guangxi_2291_2004),A_chicken_Guangxi_2439_2004),(A_duck_Guangxi_1378_2004,A_goose_Guangxi_914_2004)))
  tree height = 9.000049988483193
 Using discretized relaxed clock model.
  over sampling = 1
  parametric model = logNormalDistributionModel
   rate categories = 194
Creating state frequencies model 'hky.frequencies': Using empirical frequencies from data = {0.34814, 0.18686, 0.22972, 0.23528}
Creating HKY substitution model. Initial kappa = 1.0
Creating site model.
  4 category discrete gamma with initial shape = 0.5
Failed to load native NucleotideLikelihoodCore in : /home/ericenns/beast_1.8.3_test
Using Java nucleotide likelihood core because java.lang.UnsatisfiedLinkError: no NucleotideLikelihoodCore in java.library.path
TreeLikelihood(treeModel) using Java nucleotide likelihood core
  Ignoring ambiguities in tree likelihood.
  With 464 unique site patterns.
Branch rate model used: discretizedBranchRates
Creating state frequencies model 'geoFreqs.frequencies': Initial frequencies = {0.14286, 0.14286, 0.14286, 0.14286, 0.14286, 0.14286, 0.14286}
  General Substitution Model (stateCount=7)
  Rates relative to Fujian<->Guangdong
Creating site model.
  with initial substitution rate = 0.1
Creating swap operator for parameter branchRates.categories (weight=30.0)
dr.xml.XMLParseException: The '<bitFlipInSubstitutionModelOperator>' element with id, 'null', is incorrectly constructed.
The following was expected:
Exactly one ELEMENT of type BayesianStochasticSearchVariableSelection REQUIRED
        at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.convert(Unknown Source)
        at dr.xml.XMLParser.parse(Unknown Source)
        at dr.app.beast.BeastMain.<init>(Unknown Source)
        at dr.app.beast.BeastMain.main(Unknown Source)
May 18, 2016 11:19:49 AM dr.app.beast.BeastMain <init>
SEVERE: Parsing error - poorly formed BEAST file, H5N1_HA_discrete.xml:
The '<bitFlipInSubstitutionModelOperator>' element with id, 'null', is incorrectly constructed.
The following was expected:
Exactly one ELEMENT of type BayesianStochasticSearchVariableSelection REQUIRED
java.lang.RuntimeException: Terminate
        at dr.app.beast.BeastMain.<init>(Unknown Source)
        at dr.app.beast.BeastMain.main(Unknown Source)
rambaut commented 8 years ago

The tutorial is out of date. This can be setup from within BEAUti.