java.lang.NullPointerException with daa-meganizer

I am new to this so please excuse me if this is a stupid post.
I annotated samples with DIAMOND using the most nr database. Here is my code for this:

diamond blastx --query trimmed-cleaned-merged/JC01_trimmed-cleaned-merged.fq --db nr_diamond_database/ncbi_nr.dmnd --out diamond-blastx/JC01_diamond --outfmt 100

This ran without issue.
Next, I am trying to meganize these daa files but I keep getting null-pointer exceptions.
Here are my commands:
daa-meganizer -i JC01_diamond.daa -a2t megan-map-Jan2021.db -a2eggnog megan-map-Jan2021.db -a2interpro2go megan-map-Jan2021.db -a2kegg megan-map-Jan2021.db -a2seed megan-map-Jan2021.db

Here is the output from the most recent call to daa-meganizer:
Version MEGAN Community Edition (version 6.12.3, built 14 Aug 2018)
Copyright © 2018 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY.
Java version: 1.8.0_152-release
Functional classifications to use: EGGNOG, INTERPRO2GO, KEGG, SEED
Loading ncbi.map: 1,787,384
Loading ncbi.tre: 1,787,388
Loading file: megan-map-Jan2021.db…
Caught:
java.lang.NullPointerException
at megan.classification.data.Name2IdMap.get(Name2IdMap.java:83)
at megan.classification.data.Accession2IdMap.(Accession2IdMap.java:58)
at megan.classification.data.Accession2IdMapFactory.create(Accession2IdMapFactory.java:50)
at megan.classification.IdMapper.loadMappingFile(IdMapper.java:148)
at megan.tools.DAAMeganizer.run(DAAMeganizer.java:201)
at megan.tools.DAAMeganizer.main(DAAMeganizer.java:56)
Loading eggnog.map: 30,875
Loading eggnog.tre: 30,986
Loading file: megan-map-Jan2021.db…
Caught:
java.lang.NullPointerException
Loading interpro2go.map: 12,738
Loading interpro2go.tre: 28,689
Loading file: megan-map-Jan2021.db…
Caught:
java.lang.NullPointerException
Loading kegg.map: 100,399
Loading kegg.tre: 106,785
Loading file: megan-map-Jan2021.db…
Caught:
java.lang.NullPointerException
Loading seed.map: 13,662
Loading seed.tre: 21,085
Loading file: megan-map-Jan2021.db…
Caught:
java.lang.NullPointerException
Meganizing: JC01_diamond.daa

Please let me know if there is something I missed!

Thanks,
Josh

1 Like

Dear Josh,

you are using an old version of MEGAN (2018) that doesn’t support mapping-db files…
Please update to the latest release and the problems will go away…

1 Like