Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: Cannot invoke "beast.base.evolution.tree.Node.getNr()" because "<local7>" is null #1170

Closed
CiaccioE opened this issue Oct 22, 2024 · 3 comments

Comments

@CiaccioE
Copy link

Hello,

I am trying to run an FBD dating analysis with StarBEAST3 (1.1.9) on BEAST 2.7.5 and I keep having an error I cannot find anywhere on google groups or github. I'm not sure what this error is pointing to. I have done divergence dating with this dataset using a Yule model, however I want to try an FBD model now.

I have attached my XML file (as .txt, for some reason github is not happy with XML)

Hypo6_run5_test.xml.txt

The error is a NullPointerException error as the title states. Any help would be greatly appreciated! Thanks,

Erik

java.lang.NullPointerException: Cannot invoke "beast.base.evolution.tree.Node.getNr()" because "" is null
at starbeast3.evolution.speciation.GeneTreeForSpeciesTreeDistribution.update(Unknown Source)
at starbeast3.evolution.speciation.GeneTreeForSpeciesTreeDistribution.mapGeneNodeToSpeciesNode(Unknown Source)
at starbeast3.core.StarBeastStartState.resetGeneTreeTipHeights(Unknown Source)
at starbeast3.core.StarBeastStartState.initStateNodes(Unknown Source)
at beast.base.inference.MCMC.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)

@rbouckaert
Copy link
Member

@CiaccioE it looks like there is an alignment for the fossil that only has a single taxon (namely Cretacattyma_raveni_fossil1_gene). As a consequence, a tree with 1 node is created, which leads to the problem.

To fix this, the sequence alignment must be extended with a single sequence for Cretacattyma_raveni_fossil1_gene with all sites unknown (question marks) before importing into BEAUti. I edited the XML you posted and removed all references to the gene tree with only the Cretacattyma_raveni_fossil1_gene in it, and it seems to have solved the problem.

Hypo6_run5_test.xml.txt

Cheers, Remco

@CiaccioE
Copy link
Author

Ahh ok that makes sense. I have it running as well, thank you very much Remco!!! Beast2 rocks

Erik

@rbouckaert
Copy link
Member

Great to hear that, Erik!
I'll close the issue then, but you can reopen if the problem reappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants