husonlab / megan-ce

MEGAN Community Edition
GNU General Public License v3.0
65 stars 22 forks source link

java.lang.NullPointerException #12

Closed ravinpoudel closed 3 years ago

ravinpoudel commented 3 years ago

Hi I got java.lang.NullPointerException error, and trying to understand/fix the error. Could you provide some guidance/help. Following is log:

Meganizer - Prepares ('meganizes') a DIAMOND .daa file for use with MEGAN
Options:
Files
        --in: /project/gbru_fy21_tomato_ralstonia/run/diamond_blastx_out/R104-H7-NoDeath-4-H04-ACACGTGT.daa
Mode
        --longReads: false
Parameters
        --classify: true
        --minScore: 50.0
        --maxExpected: 0.01
        --minPercentIdentity: 0.0
        --topPercent: 10.0
        --minSupportPercent: 0.05
        --minSupport: 0
        --minPercentReadCover: 0.0
        --minPercentReferenceCover: 0.0
        --minReadLength: 0
        --lcaAlgorithm: naive
        --lcaCoveragePercent: 100.0
        --readAssignmentMode: readCount
Classification support:
        --mapDB: /project/gbru_fy21_tomato_ralstonia/run/script/megandb/megan-map-Jan2021.db
Deprecated classification support:
        --parseTaxonNames: true
        --firstWordIsAccession: true
        --accessionTags: gb| ref|
Other:
        --threads: 6
        --tempStoreInMemory: false
        --verbose: true
Version   MEGAN Community Edition (version 6.21.2, built 14 Mar 2021)
Author(s) Daniel H. Huson
Copyright (C) 2020 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY.
Java version: 14.0.1
Functional classifications to use: EC, EGGNOG, GTDB, INTERPRO2GO, SEED
Loading ncbi.map: 2,302,807
Loading ncbi.tre: 2,302,811
Loading ec.map:     8,081
Loading ec.tre:     8,085
Loading eggnog.map:    30,875
Loading eggnog.tre:    30,986
Loading gtdb.map:   240,103
Loading gtdb.tre:   240,107
Loading interpro2go.map:    13,894
Loading interpro2go.tre:    28,869
Loading seed.map:       979
Loading seed.tre:       980
Meganizing: /project/gbru_fy21_tomato_ralstonia/run/diamond_blastx_out/R104-H7-NoDeath-4-H04-ACACGTGT.daa
Meganizing init
Annotating DAA file using FAST mode (accession database and first accession per line)
Annotating references
10% 20% 30% 40% 50% 60% 70% 80% 90% 100% (281.2s)
Writing
10% 20% 30% 40% 50% 60% 70% 80% 90% Caught:
java.lang.NullPointerException
        at java.base/java.lang.System.arraycopy(Native Method)
        at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:129)
        at megan/megan.daa.io.DAAModifier.appendBlocks(DAAModifier.java:140)
        at megan/megan.daa.io.DAAModifier.appendBlocks(DAAModifier.java:156)
        at megan/megan.daa.DAAReferencesAnnotator.apply(DAAReferencesAnnotator.java:250)
        at megan/megan.daa.Meganize.apply(Meganize.java:73)
        at megan/megan.tools.DAAMeganizer.run(DAAMeganizer.java:269)
        at megan/megan.tools.DAAMeganizer.main(DAAMeganizer.java:65)

real    5m6.326s
user    22m15.296s
sys     1m43.066s
ravinpoudel commented 3 years ago

I think I was running out t of memory.

So, what i did was: cd to .conda/envs/megan/opt/megan-6.21.2/MEGAN.vmoptions and allocated more memory -- increased to 32G. This seems to solve the issues. Thought might be useful for others facing similar issues.

Thanks for the amazing tool.