Operating Environment:
- Platform: NESI Jupyter Terminal
- MEGAN Version: MEGAN Ultimate Edition (version 6.25.3, built 15 Sep 2023)
Tool Used:
- Tool: taxa2function via slurm script
Description: A NullPointerException
error occurs when executing the taxonomy2function
tool with the -ar
option. The same command, minus the -ar Genus
option, works flawlessly both before and after the 13 Sep 2023 update (Release notes MEGAN6 V6_25_2), which introduced -ar
and -br
options to the taxonomony2function
tool.
Command Triggering Error:
sample_id="S01"
$TOOL_DIR/taxonomy2function -i ${sample_id}.genes.fna.daa -o outputDir2/${sample_id}.outgenusnametokeggpath -a Taxonomy -af name -ar Genus -b KEGG -bf path -s semi-colon -ps semi-colon -sh -v
Error Stack Trace:
...
Caught:
java.lang.NullPointerException: Cannot invoke "megan.classification.Classification.getIdMapper()" because "megan.viewer.TaxonomyData.taxonomyClassification" is null
at megan/megan.viewer.TaxonomyData.getTaxonomicRank(TaxonomyData.java:116)
at megan/megan.viewer.TaxonomyData.getAncestorAtGivenRank(TaxonomyData.java:154)
at megan/megan.tools.Taxonomy2Function.run(Taxonomy2Function.java:233)
at megan/megan.tools.Taxonomy2Function.main(Taxonomy2Function.java:55)
at megan6u/megan6u.tools.Taxonomy2Function.main(Unknown Source)
...
Working Command:
# Same command as above
Additional Information: The issue seems to stem from the -ar
option added in the recent update. The input file used was ${sample_id}.genes.fna.daa
, with no non-standard mapping or taxonomy files involved. The objective was to process data using the taxonomy2function
tool to generate output in outputDir2/${sample_id}.outgenusnametokeggpath
.
Further Observations: Switching the second classification to genus using -br
doesn’t resolve the issue but seems to prolong the process before the error occurs.
...
Processing: First classification
10% 20%
Request for Guidance: Seeking guidance on resolving this error to continue with data analysis. It appears the -ar
option is the root cause of the NullPointerException
within the Taxonomy2Function
tool.