Code Monkey home page Code Monkey logo

beastlabs's People

Contributors

alexeid avatar jheled avatar jordandouglas avatar lmaurits avatar nicfel avatar rbouckaert avatar tgvaughan avatar walterxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beastlabs's Issues

Critical bug at Slice

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);
    }

AVMN operator returns tree with negative branch lengths

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.

Name clash

In the main beast2 package there is also test.beast.evolution.likelihood.TreeLikelihoodTest class.

Deadlock when using Particle Filter

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

DocumentationTest fails for some classes

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]

ConstantSitesAlignment

<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"/> 

Starting tree subtemplates merge with generic mergepoint

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
Capture d’écran (40)

Proposed fix: starting tree subtemplates should probably have a specific mergepoint, like the tree priors

SimpleRandomTree builds mixed clades under monophyly constraints

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…

TreeAnnotation to add meta data

@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

MCMCMC mechanism for creating multiple chains duplicates the entire model

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...

Bad dependency of LogAnalyserAdv

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.

cite MCMCMC to its original paper

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")

Ancestral state reconstruction for multiple MRCAs with datatype-awareness

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.