GithubHelp home page GithubHelp logo

Comments (6)

rbouckaert avatar rbouckaert commented on September 26, 2024

Perhaps the MRCAPriorWithRogues is what you are looking for. It is in the BEASTLabs package. To use it requires a bit of XML editing. Probably easiest is to set up an MRCA prior in BEAUti and specify the taxa in taxonlist1. Save the file, and open the XML in a text editor. Go to the MRCA prior, which looks something like this:

                <distribution id="taxonlist1.prior" spec="beast.base.evolution.tree.MRCAPrior" tree="@Tree.t:dna" monophyletic="true">
                    <taxonset id="taxonlist1" spec="TaxonSet">
                        <taxon id="Carp" spec="Taxon"/>
                        <taxon id="Chicken" spec="Taxon"/>
                        <taxon id="Cow" spec="Taxon"/>
                    </taxonset>
                </distribution>

Replace the spec attribute with beastlabs.math.distributions.MRCAPriorWithRogues and add the rogues in taxonlist2, so it looks like this:

                <distribution id="taxonlist1.prior" spec="beastlabs.math.distributions.MRCAPriorWithRogues" tree="@Tree.t:dna" monophyletic="true">
                    <taxonset id="taxonlist1" spec="TaxonSet">
                        <taxon id="Carp" spec="Taxon"/>
                        <taxon id="Chicken" spec="Taxon"/>
                        <taxon id="Cow" spec="Taxon"/>
                    </taxonset>
                    <rogues id="taxonlist2" spec="TaxonSet">
                        <taxon id="Dog" spec="Taxon"/>
                        <taxon id="Dolphin" spec="Taxon"/>
                        <taxon id="Duck" spec="Taxon"/>
                    </rogues>
                </distribution>

You need to have to the BEASTLabs package installed to run the XML. Hope this is what you had in mind.

from beast2.

seraklop avatar seraklop commented on September 26, 2024

Dear Remco,

great, thanks so much! Of course that is exactly what we need.
However, now initialization apparently does not work anymore with the NJ starting tree. Is it possible that this function only works with hard constraints and not with such partial constraints?

Thanks a lot for your help,
Seraina

from beast2.

rbouckaert avatar rbouckaert commented on September 26, 2024

Hi Seraina,

The ClusterTree indeed does not pick up such constraints, but the ConstrainedClusterTree. Can you try replacing the XML element with spec="ClusterTree" to spec="beastlabs.evolution.tree.ConstrainedClusterTree" and see whether that starts.

Cheers, Remco

from beast2.

AlexaViert avatar AlexaViert commented on September 26, 2024

Dear Remco

Thank you already for your help. Seraina and I tried with the ConstrainedClusterTree, but now the analysis will not initialize because it detects negative branch lengths. Do you know what the issue could be? We tried already to use different seeds.

Best,
Alexandra

from beast2.

rbouckaert avatar rbouckaert commented on September 26, 2024

Hi Alexandra,

The ConstrainedClusterTree has a minimum branch length option (defaults to minBranchLength="1e-10") that should guarantee some minimum branch length. Obviously, this is not working for your analysis. If you can send me the XML I can have a look at what is causing the problem.

Have you tried using a RandomTree for initialisation? This is recommended in general in order to not bias the MCMC sample by a fixed starting point.

Cheers, Remco

from beast2.

seraklop avatar seraklop commented on September 26, 2024

Dear Remco,
thanks so much for all your help - Alexandra is in the last weeks of her PhD, and your input already greatly helped us speed up the process!
We are now using both a random and a user tree as starting trees and compare the outcome. So currently, we have a work-around for the issue with the ConstrainedClusterTree (it is a dataset with a large number of highly incomplete fossils and thus a lot of uncertainty in the topology, which is making convergence very slow - hence our need to use a good starting tree as well).
But if it is interesting for you to get our input files in any case to repeat the issue, let us know. Otherwise, from our side, this could be closed.
Thanks again!
Seraina

from beast2.

Related Issues (20)

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.