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

NullPointerException with crossvalidate #6

Open
iimog opened this issue Nov 24, 2014 · 3 comments
Open

NullPointerException with crossvalidate #6

iimog opened this issue Nov 24, 2014 · 3 comments
Assignees

Comments

@iimog
Copy link

iimog commented Nov 24, 2014

I'm trying to crossvalidate my training set with the latest classifier version from github (2014-11-24) on 64 bit Ubuntu 14.04 with java version "1.7.0_65" (OpenJDK). Unfortunately I get a NullPointerException each time I try:

java -Xmx1g -jar ~/software/RDPTools/classifier.jar crossvalidate -o minimal.txt -s minimal.fa -t minimal.tax
164458368
298507601
298507603
164458369
298507604
Exception in thread "main" java.lang.NullPointerException
    at edu.msu.cme.rdp.classifier.train.validation.HierarchyTree.getWordOccurrence(HierarchyTree.java:289)
    at edu.msu.cme.rdp.classifier.train.validation.NBClassifier.calculateProb(NBClassifier.java:107)
    at edu.msu.cme.rdp.classifier.train.validation.NBClassifier.assignClass(NBClassifier.java:68)
    at edu.msu.cme.rdp.classifier.train.validation.DecisionMaker.getBestClasspath(DecisionMaker.java:42)
    at edu.msu.cme.rdp.classifier.train.validation.crossvalidate.CrossValidate.runTest(CrossValidate.java:117)
    at edu.msu.cme.rdp.classifier.train.validation.crossvalidate.CrossValidateMain.main(CrossValidateMain.java:121)
    at edu.msu.cme.rdp.classifier.cli.ClassifierMain.main(ClassifierMain.java:77)

For testing purpose I attach my minimal.fa and minimal.tax below. They work fine with loot, taxa-sim and train.
minimal.fa: https://gist.github.com/iimog/aa2ce23ab6f4d63cfa2b
minimal.tax: https://gist.github.com/iimog/4ea791d8be7f51073c46

Any help would be highly regarded.

Thanks in advance,
Markus Ankenbrand

@rdpstaffmsu
Copy link

Hello, we are sorry for the late reply there have been some issues on our notifications! We are currently working on troubleshooting this and will hopefully have an answer for you soon.

@rdpstaffmsu rdpstaffmsu self-assigned this Feb 20, 2015
@rdpstaffmsu
Copy link

Hello, we have updated our classifier to resolve the problem you were having, if you could please update your version and try it again. Let us know if you have any other issues!

@iimog
Copy link
Author

iimog commented Feb 25, 2015

Thank you very much for solving the problem. Crossvalidate works now also on my full dataset. However if I set --rdmRank to species, family, order, class, phylum, kingdom or rootrank I get only NaN in the output. And for "--rdmRank genus" I get another NullPointerException:

java -Xmx1g -jar ~/software/RDPTools/classifier.jar crossvalidate -o minimal.genus.txt -s minimal.fa -t minimal.tax -r genus
Exception in thread "main" java.lang.NullPointerException
    at java.util.AbstractCollection.addAll(AbstractCollection.java:341)
    at edu.msu.cme.rdp.classifier.train.validation.crossvalidate.RdmSelectTaxon.randomSelectTaxon(RdmSelectTaxon.java:92)
    at edu.msu.cme.rdp.classifier.train.validation.crossvalidate.CrossValidate.runTest(CrossValidate.java:65)
    at edu.msu.cme.rdp.classifier.train.validation.crossvalidate.CrossValidateMain.main(CrossValidateMain.java:121)
    at edu.msu.cme.rdp.classifier.cli.ClassifierMain.main(ClassifierMain.java:77)

This applies to my full data set as well as the minimal example provided above.
Thank you very much for solving the first problem.

Best wishes,
Markus

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