zhangchicool / speciesnetwork Goto Github PK
View Code? Open in Web Editor NEWBayesian Inference of Species Networks from Multilocus Sequence Data (a package for BEAST2)
License: GNU General Public License v3.0
Bayesian Inference of Species Networks from Multilocus Sequence Data (a package for BEAST2)
License: GNU General Public License v3.0
TODO
As @zhangchicool mentioned to me, SpeciesNetwork
has problems with many different gene trees. One simple way around this might be to use a tree selector class, with inputs List<TreeInterface> trees
and IntegerParameter index
(1-dimensional) and behaving as if it was trees.get().get(index.getValue())
for TreeInterface
purposes. Having one of these for each gene tree, and uniform integer operators to change their values of index
, trivially implements a reversible jump method that groups genes into groups with identical gene trees. (This may have bad convergence, but I'd be happy to at least try it out.)
However, this tree selector class would not be a useful subclass of Tree
, so it would not work as input for GeneTreeInSpeciesNetwork
via EmbeddedTree
. Given the possible issue #4 with embedding initialization and this use case, might it be prudent to drop EmbeddedTree
and permit GeneTreeInSpeciesNetwork
to accept a TreeInterface
as its geneTree
input and take over the responsibility to track the Embedding in its own methods?
The redundant blocks added look like this:
<init id="RandomTree.t:47" spec="beast.evolution.tree.RandomTree" estimate="false" initial="@Tree.t:47" taxa="@47">
<populationModel id="ConstantPopulation0.t:47" spec="ConstantPopulation">
<parameter id="randomPopSize.t:47" name="popSize">1.0</parameter>
</populationModel>
</init>
After wondering why I get so many NullPointerExceptions,
at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:158)
at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:158)
at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:158)
at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:158)
at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:158)
at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:158)
at speciesnetwork.GeneTreeInSpeciesNetwork.update(GeneTreeInSpeciesNetwork.java:117)
at speciesnetwork.GeneTreeInSpeciesNetwork.computeCoalescentTimes(GeneTreeInSpeciesNetwork.java:96)
at speciesnetwork.MultispeciesCoalescent.calculateLogP(MultispeciesCoalescent.java:90)
at beast.core.util.CompoundDistribution.calculateLogP(CompoundDistribution.java:114)
at beast.core.MCMC.propagateState(MCMC.java:496)
at beast.core.MCMC.doLoop(MCMC.java:383)
at beast.core.MCMC.run(MCMC.java:353)
at beast.app.BeastMCMC.run(BeastMCMC.java:357)
at beast.app.beastapp.BeastMain.<init>(BeastMain.java:113)
at beast.app.beastapp.BeastMain.main(BeastMain.java:659)
I noticed the assertions in
Exception in thread "main" java.lang.AssertionError at speciesnetwork.GeneTreeInSpeciesNetwork.recurseCoalescentEvents(GeneTreeInSpeciesNetwork.java:147)
.
I don't know how traversal numbers should behave and what the getDirection function is supposed to do,
final int traversalNodeNumber = speciesNetworkNode.getTraversalNumber();
final Integer nextSpeciesBranchNumber = geneTree.embedding.getDirection(geneTreeNodeNumber, traversalNodeNumber);
but the calls above that look reasonable.
@zhangchicool I sent you my XML files that produce this issue, in case that might help track down the problem because it's a user error.
I'm trying to set some constraints in gene trees, but in order to get a non -Inf likelihood I have to also set compatible starting trees, as we would do in e.g. BEAST or StarBEAST. But I'm struggling to accomplish that. Basically what I did was follow a (working) xml file generated for BEAST and added a couple of <init> tags with spec="beast.util.TreeParser" inside <run>, just before the <distribution id="posterior"> tag. Everything seems to be ok, except that I'm getting this error:
Error 110 parsing the xml input file
validate and intialize error: class beast.util.TreeParser cannot be cast to class speciesnetwork.EmbeddedTree (beast.util.TreeParser and speciesnetwork.EmbeddedTree are in unnamed module of loader beast.util.BEASTClassLoader @7229724f)
Am I in the right path? Is there another class I should use for that? And how?
Thank you so much!
It should put the mean, median, and HPD intervals of node heights and gamma probs (if apply) in the attributes.
Dear developers,
I am wondering whether invariant sites affect the results.
Although I read some suggestions that I should include invariant sites in the google group of "beast-users", I want to know whether that case is the same to SpeciesNetwork.
I randomly collected 100 successive SNPs in each chromosomes from VCF file.
Does it affect the final result in SpeciesNetwork?
Best regards.
As far as I can see, the code that sets ν and λ from the input parameters
speciesnetwork/src/speciesnetwork/BirthHybridizationModel.java
Lines 44 to 55 in a330f4a
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.