Error in Path Sampler when trying BFD* in snapper

195 views
Skip to first unread message

Mariana Vasconcellos

unread,
Jan 22, 2024, 12:18:10 PMJan 22
to beast-users
Dear all,
I am trying to run the sanpper-delimitation-tutorial from 2021 with the gecko input file provided. I have added the following piece in the input file (according to an answer from Remco Bouckaert to someone else in this list).

<run spec='modelselection.inference.PathSampler'

chainLength="100000"

alpha='0.3'

rootdir='/work/02198/mmv442/ls6/Enyalius_project/BFD/runA'

burnInPercentage='0'

preBurnin="0"

deleteOldLogs='true'

nrOfSteps='24'>

cd $(dir)

$(java) -cp $(java.class.path) beast.pkgmgmt.launcher.BeastLauncher $(resume/overwrite) -seed $(seed) beast.xml


But, it does not seem to work either in the cluster or on my Mac-OS computer (correcting the rootdir, of course). The following is what I get as an error message in the cluster. It creates all the step folders but it fails after that.

Loading /work/02198/mmv442/ls6/Enyalius_project/BFD/runA/step0/likelihood.logjava.io.FileNotFoundException: /work/02198/mmv442/ls6/Enyalius_project/BFD/runA/step0/likelihood.log (No such file or directory)

at java.base/java.io.FileInputStream.open0(Native Method)

at java.base/java.io.FileInputStream.open(Unknown Source)

at java.base/java.io.FileInputStream.<init>(Unknown Source)

at java.base/java.io.FileInputStream.<init>(Unknown Source)

at java.base/java.io.FileReader.<init>(Unknown Source)

at beastfx.app.tools.LogAnalyser.readLogFile(Unknown Source)

at beastfx.app.tools.LogAnalyser.<init>(Unknown Source)

at beastfx.app.tools.LogAnalyser.<init>(Unknown Source)

at modelselection.inference.PathSampleAnalyser.estimateMarginalLikelihood(Unknown Source)

at modelselection.inference.PathSampleAnalyser.estimateMarginalLikelihood(Unknown Source)

at modelselection.inference.PathSampler.analyse(Unknown Source)

at modelselection.inference.PathSampler.doRuns(Unknown Source)

at modelselection.inference.PathSampler.run(Unknown Source)

at beastfx.app.beast.BeastMCMC.run(Unknown Source)

at beastfx.app.beast.BeastMain.main(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.run(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.main(Unknown Source)

In addition, when I try to run the 'beast.xml' inside the step0 folder to see what happens, this is the error message I get.

File: beast.xml seed: 1705711745880 threads: 64

Loading package BEASTLabs v2.0.0 SNAPP v1.6.1 BEAST.app v2.7.6 BEAST.base v2.7.6 snapper v1.1.4 ORC v1.1.2 speedemon v1.1.0 BICEPS v1.1.2 MODEL_SELECTION v1.6.2    

java.lang.RuntimeException: Duplicate taxon found in alignment: kya

at beast.base.evolution.alignment.Alignment.initializeWithSequenceList(Unknown Source)

at beast.base.evolution.alignment.Alignment.initAndValidate(Unknown Source)

at snapper.Data.initAndValidate(Unknown Source)

at beast.base.parser.XMLParser.initBEASTObjects(Unknown Source)

at beast.base.parser.XMLParser.parse(Unknown Source)

at beast.base.parser.XMLParser.parseFile(Unknown Source)

at beastfx.app.beast.BeastMCMC.parseArgs(Unknown Source)

at beastfx.app.beast.BeastMain.main(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.run(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.main(Unknown Source)

java.lang.RuntimeException: java.lang.RuntimeException: Duplicate taxon found in alignment: kya

at beast.base.evolution.alignment.Alignment.initializeWithSequenceList(Unknown Source)

at beast.base.evolution.alignment.Alignment.initAndValidate(Unknown Source)

at snapper.Data.initAndValidate(Unknown Source)

at beast.base.parser.XMLParser.initBEASTObjects(Unknown Source)

at beast.base.parser.XMLParser.parse(Unknown Source)

at beast.base.parser.XMLParser.parseFile(Unknown Source)

at beastfx.app.beast.BeastMCMC.parseArgs(Unknown Source)

at beastfx.app.beast.BeastMain.main(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.run(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.main(Unknown Source)

Caused by: java.lang.RuntimeException: Duplicate taxon found in alignment: kya

The input file used is here.

The error message in my Mac-OS is the following. My java is 1.8.

Error: LinkageError occurred while loading main class beast.pkgmgmt.launcher.BeastLauncher
java.lang.UnsupportedClassVersionError: beast/pkgmgmt/launcher/BeastLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 56.0
java.io.FileNotFoundException: /Users/marianavasconcellos/Documents/My_Drive/POSTDOC/Projects/Enyalius/RAD_seq_analyses/SNAPPER_BEAST_delimitation/snapper-delimitation-tutorial_2021/runA/step0/beast.xml.state (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at modelselection.inference.PathSampler.copyStateFile(Unknown Source)
at modelselection.inference.PathSampler.doRuns(Unknown Source)
at modelselection.inference.PathSampler.run(Unknown Source)
at beastfx.app.beast.BeastMCMC.run(Unknown Source)
at beastfx.app.beast.Controller$2.run(Unknown Source)

Could someone help me to figure out what is going on?

Thank you,

Mariana

Remco Bouckaert

unread,
Jan 22, 2024, 2:25:23 PMJan 22
to beast...@googlegroups.com
Hi Mariana,

Thanks for the detailed bug report. I tried the file you linked to on OS X (changing root dir and nrOfSteps) and it runs fine from a terminal. For some reason, the kya taxon appears to be duplicated. Could you post the beast.xml file so I can investigate how this happened?

The last error indicates java 8 is picked up, but BEAST v2.7 requires java 17, which is included in the distribution of BEAST. The "$(java)" in the XML should be replaced by the java 17 executable from the BEAST directory. That does not seem to happen. Can you show what is in the run.sh file in the step0 folder? 

Cheers,

Remco

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beast-users/8011c83c-72f5-4d36-b7b4-5b4e5d3eafc1n%40googlegroups.com.

Mariana Vasconcellos

unread,
Jan 22, 2024, 3:34:28 PMJan 22
to beast...@googlegroups.com
Hi Remco,
I added all files generated by my attempt to run beast.xml in step0 folder in here.

Thanks for your time. 
Mariana


higg...@gmail.com

unread,
Jan 22, 2024, 4:13:30 PMJan 22
to beast-users
Thanks Mariana, 

There appears to be a bug with threading that causes the taxonsets to be duplicated (issue raised here: https://github.com/BEAST2-Dev/model-selection/issues/13).
For now, running it with a single thread should work, so changing the number of threads to 1 in the slurm script may make it work.

You might consider using speedemon for species delimitation instead (tutorial here: https://github.com/rbouckaert/speedemon/tree/master/tutorial), which just requires running a single MCMC analysis, making it more convenient than BFD*.

Cheers,

Remco

Mariana Vasconcellos

unread,
Feb 7, 2024, 1:23:01 AMFeb 7
to beast...@googlegroups.com
Hi Remco,
Thank you for your response. I have been trying to run speedemon. I have done ~2.5 M generations (see the tracer results below) and this analysis seems to have a hard time to find the right tree. I saw in the Supp material of Douglas & Bouckaert et al (2022) that 10M generations were used in the gecko analysis. Is this the time that it usually takes to converge in the right tree? I have performed several other phylogenetic analysis (concatenated and coalescent), including a snapper run and all of them have consistently return the same tree with high confidence. 

I was wondering if I could add this tree as a prior so the analysis converge a bit quicker. If so, how could I do it? I have added a newick tree with the “species” names, but it gives me an error to initialize the run. Maybe I am doing something wrong. Could you give me some advice in this regard?

The files are here: 

Thank you very much,
Mariana




Reply all
Reply to author
Forward
0 new messages