BEASTLabs: BEAST 2 (http://beast2.org) package containing some generally useful stuff used by other packages.
beast2-dev / beastlabs Goto Github PK
View Code? Open in Web Editor NEWA package for BEAST 2 implementing generally useful stuff
A package for BEAST 2 implementing generally useful stuff
BEASTLabs: BEAST 2 (http://beast2.org) package containing some generally useful stuff used by other packages.
Running ant junitBEASTlabs
fails DocumentationTest for some BEASTLabs classes.
See below for Junit report details.
Class | Name | Status | Type |
---|---|---|---|
DocumentationTest | testInputTipText | Failure | No proper input tip text (at least 4 words and 15 characters) for: [beast.evolution.tree.TreeDistanceLogger:metric, beast.inference.ConvergableMCMC:checkEvery, beast.inference.ConvergableMCMC:threshold, beast.inference.ConvergableMCMC:convergedFor, beast.inference.ConvergableMCMC:tempDir, beast.inference.ConvergableMCMC:treeStorer, beast.inference.ConvergableMCMC:convergenceBurnin, beast.inference.ConvergableMCMC:rhatLogger, beast.inference.ConvergableMCMC:ESS, beast.inference.ConvergableMCMC:rhat, beast.math.distributions.BetaRange:x] |
DocumentationTest | testDescriptions | Failure | No proper description for: [beast.core.GridSearch, beast.evolution.tree.RobinsonsFouldMetric, beast.inference.ConvergableMCMC, beast.math.distributions.BetaRange, beast.math.distributions.WeightedDirichlet, beast.util.BEASTVector] |
In Slice
, the method below is alway returning the 1st element of a parameter, even if the parameter has multiple dimensions:
public double getArrayValue() {
return functionInput.get().getArrayValue(0);
}
The correct code should be
public double getArrayValue() {
return functionInput.get().getArrayValue(indexStart);
}
If a tree contains dated tips the scale method of the Tree can return a tree with negative branch lengths. The operator should check that such tree is not valid and return -Infinity
if a negative branch length is detected.
A tree stretch move instead of a scale move might be better regardless.
Reproducable through running XML from CompEvol/beast2#1055
329e48f fixes the symptoms, but it would be good to prevent short branch lengths from happening during the calculation of the distance in RNNIMetric.
Need to be confirmed and found out why this happens.
add the citation to MCMCMC:
@Citation(value= "Altekar G, Dwarkadas S, Huelsenbeck J and Ronquist F (2004). \n" +
" Parallel Metropolis Coupled Markov Chain Monte Carlo For Bayesian Phylogenetic Inference.\n" +
" Bioinformatics, 20(3), 407-415."
, year = 2004, firstAuthorSurname = "Altekar",
DOI="10.1093/bioinformatics/btg427")
Hello,
I am using the method Particle Filter explained here, and I am facing a deadlock of the threads of the particles when getting into stepsize. Here is the output of "tail particle*/beast.log":
==> particle0/beast.log <==
Sample posterior ESS(posterior) prior ESS(prior) likelihood ESS(lik_ihood)
0 -21975.2366 N -78.0244 N -21897.2122 N --
10000 -4873.4365 2.0 -189.1466 2.0 -4684.2899 2.0 --
20000 -4480.6041 3.0 -179.8027 3.0 -4300.8014 3.0 --
25000: writing /home/dreyes/prueba_antonio/sideritis_mcmc/particles_cpus/particleset3/particle0/particlelock0
25000: waiting for /home/dreyes/prueba_antonio/sideritis_mcmc/particles_cpus/particleset3/particle0/threadlock0
==> particle1/beast.log <==
Sample posterior ESS(posterior) prior ESS(prior) likelihood ESS(lik_ihood)
0 -21975.1679 N -78.0244 N -21897.1434 N --
10000 -4844.3121 2.0 -216.0260 2.0 -4628.2860 2.0 --
20000 -4431.8588 3.0 -168.5222 3.0 -4263.3365 3.0 --
25000: writing /home/dreyes/prueba_antonio/sideritis_mcmc/particles_cpus/particleset3/particle1/particlelock0
25000: waiting for /home/dreyes/prueba_antonio/sideritis_mcmc/particles_cpus/particleset3/particle1/threadlock0
==> particle2/beast.log <==
Sample posterior ESS(posterior) prior ESS(prior) likelihood ESS(lik_ihood)
0 -21975.1738 N -78.0244 N -21897.1493 N --
10000 -4690.5879 2.0 -196.0932 2.0 -4494.4947 2.0 --
20000 -4463.5546 3.0 -162.7462 3.0 -4300.8084 3.0 --
25000: writing /home/dreyes/prueba_antonio/sideritis_mcmc/particles_cpus/particleset3/particle2/particlelock0
25000: waiting for /home/dreyes/prueba_antonio/sideritis_mcmc/particles_cpus/particleset3/particle2/threadlock0
I have read the code and the deadlock probably happens somewhere in between the lines 60 to 69 of ParticleLauncherByFile.java. I have attached my code in a txt because github doesn't allow to attach xml files -> SIDERITIS.MultipleParticles.txt.
Best regards,
Daniel Reyes
<taxonset id="TaxonSet" spec="TaxonSet">
List<Taxon>
</taxonset>
<data id="alignment" spec="ConstantSitesAlignment" taxa="@TaxonSet" dataType="nucleotideDiploid16"
constantSiteWeights="273324 0 0 0 0 226738 0 0 0 0 226113 0 0 0 0 273825"/>
@tgvaughan @gavryushkina
I think this may be interesting to you. I created TreeAnnotation
when I tried to colour SA trees by a meta data instead of labels. I also updated Sasha's ConvertZBTreeToSATree
to use the meta data mapping file.
TreeAnnotation
annotates nodes of a tree according to an annotation map, which is imported from a tab delimited file with header (1 trait only at the moment). The 1st column is tip labels, and the 2nd is trait values.
The annotation map uses tip labels as key, and trait value as value. The trait name is given by the constructor. It can be null, in that case, then the 2nd column name from header is assigned to the trait name.
Usage: TreeAnnotation treeFile mapFilePath
@rbouckaert
PrunedRelaxedClockModel
has the code to assume UCRelaxedClockModel
meanRate
is RealParameter
. I add the code to cast it into RealParameter
after meanRate
is changed to Function
.
Please review my bug fix and close this issue if you are happy with the solution.
beast.util.LogAnalyserAdv
should not :
import test.beast.beast2vs1.trace.LogFileTraces;
import test.beast.beast2vs1.trace.TraceException;
import test.beast.beast2vs1.trace.TraceStatistics;
It should either use beast.util.LogAnalyser
or be removed.
In my beast.xml (attached), I have MRCA priors set up in a consistent manner, but due to the implementation of SimpleRandomTree
, the initialization fails.
At its core, I have the following stack of MRCA priors.
<distribution id="alor1247-besar_originateMRCA" monophyletic="true" spec="beast.math.distributions.MRCAPrior" tree="@Tree.t:beastlingTree" useOriginate="true">
<taxonset id="tx_alor1247-besar" spec="TaxonSet">
<taxon idref="alor1247-besar" />
</taxonset>
<Normal id="DistributionForalor1247-besar_originateMRCA" mean="450.0" name="distr" offset="0.0" sigma="25.5102040816" />
</distribution>
<distribution id="alorese_originateMRCA" monophyletic="true" spec="beast.math.distributions.MRCAPrior" tree="@Tree.t:beastlingTree" useOriginate="true">
<taxonset id="alorese" spec="TaxonSet">
<plate range="alor1247-baran,alor1247-besar,alor1247-munas,alor1247-pandai" var="language">
<taxon idref="$(language)" />
</plate>
</taxonset>
<Normal id="DistributionForalorese_originateMRCA" mean="675.0" name="distr" offset="0.0" sigma="12.7551020408" />
</distribution>
<distribution id="lamaholoticMRCA" monophyletic="true" spec="beast.math.distributions.MRCAPrior" tree="@Tree.t:beastlingTree">
<taxonset id="lamaholotic" spec="TaxonSet">
<plate range="alor1247-baran,alor1247-besar,alor1247-munas,alor1247-pandai,lama1277-adona,lama1277-baipi,lama1277-bama,lama1277-belan,lama1277-botun,lama1277-dulhi,lama1277-horow,lama1277-ileap,lama1277-imulo,lama1277-kalik,lama1277-kiwan,lama1277-lamah,lama1277-lamak,lama1277-lamal,lama1277-lamat,lama1277-lerek,lama1277-lewob,lama1277-lewoe,lama1277-lewog,lama1277-lewoi,lama1277-lewok,lama1277-lewom,lama1277-lewop,lama1277-lewot,lama1277-lewuk,lama1277-merde,lama1277-minga,lama1277-mulan,lama1277-paina,lama1277-pukau,lama1277-ritae,lama1277-tanju,lama1277-waiba,lama1277-waiwa,lama1277-watan,lama1277-wuake" var="language">
<taxon idref="$(language)" />
</plate>
</taxonset>
<Uniform id="DistributionForlamaholoticMRCA" lower="300.0" name="distr" offset="0.0" upper="9223372036854775807" />
</distribution>
In the doTheWork()
method of SimpleRandomTree
, Alor-Besar ist first grouped with one of its Alorese siblings to ensure that the MRCA prior on its ancestor can be fulfilled. Both are then removed from the taxonsets that still need to be considered. When the turn comes op for the equivalent step for the Alorese taxonset, a similar thing happens to another Alorese sibling together with one Lamaholot taxon, but for some reason which still escapes my debugging, that grouping has priority over the Alorese-internal grouping, so the SimpleRandomTree
ends up containing something like
(((alor1247-besar,alor1247-baran),(alor1247-munas,(alor1247-pandai,lama1277-lamah))),(lama…
The starting tree subtemplates provided by BEASTLabs merge with "parametricDistributions" as mergepoint so you cannot remove them from a custom template without also removing the Uniform/etc distributions
Proposed fix: starting tree subtemplates should probably have a specific mergepoint, like the tree priors
PrunedAlignment
uses a given TaxonSet based on whether taxonSet
is null
or not. However, the corresponding input is optional with a default value of TaxonSet()
. This means that PA's initAndValidate should instead check whether taxonSet is empty.
uncomment the commented code in calcLogP
in WeightedDirichlet
, and add Unit test to test logP
I have written and tested an AncestralStatesLogger extension, which allows the reconstruction at multiple MRCA nodes, each specified by a taxonset, and which logs the original representation of the value instead of the internal one (eg. covarion logs as 01ab
instead of 0123
– The code for that was taken from the AncestralStateTreeLikelihood class in beast-classics).
That class should be backward compatible with AncestralStateLogger and I would be happy to create a pull-request to it for this directory, if you like.
In the main beast2 package there is also test.beast.evolution.likelihood.TreeLikelihoodTest class.
This makes it impossible to use references to BEASTObjects as keys, even when those BEASTObjects represent things like a Taxon or Locus.
Maybe instead of serializing, regexing and deserializing MCMCMC could work entirely with the BEASTObjects themselves. Only CalculationNodes and StateNodes need to be copied after all...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.