NullpointerException in gene_classification
An external user ran into an issue with the gene_classification function with this nullpointerexception. The exception points towards GeneClassification.java:2797, where this line gives the exception:
output.append("Gene copies : " + geneCopyStatisticsLT[0] + ", " + df.format(geneCopyStatisticsLT[1]) + ", " + df.format(geneCopyStatisticsLT[2]) + "\n");
Here the gene geneCopyStatisticsLT has not been created (If it had been and the numbers were not added they would be 0). I looked further into the code and found a block querying the graph database in Geneclassification.alleleStatistics(GeneClassification.java:1324). This block does not throw an exception so I suspect an error in querying the database for this block. Further investigation needed.
The full error message:
#352/21352 homology groups
#16:51:40 [INFO ] Start extracting and counting sequences
# Gathering single-copy gene info: 330/330java.lang.NullPointerException
# at nl.wur.bif.pantools.analysis.gene_classification.GeneClassification.createGeneClassificationOverviewTxtCsv(GeneClassification.java:2797)
# at nl.wur.bif.pantools.analysis.gene_classification.GeneClassification.geneClassification(GeneClassification.java:387)
# at nl.wur.bif.pantools.analysis.gene_classification.GeneClassificationCLI.call(GeneClassificationCLI.java:106)
# at nl.wur.bif.pantools.analysis.gene_classification.GeneClassificationCLI.call(GeneClassificationCLI.java:24)
# at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
# at picocli.CommandLine.access$1300(CommandLine.java:145)
# at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
# at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
# at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
# at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
# at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
# at nl.wur.bif.pantools.Pantools.executionStrategy(Pantools.java:248)
# at picocli.CommandLine.execute(CommandLine.java:2078)
# at nl.wur.bif.pantools.Pantools.main(Pantools.java:210)
Edited by Robin van Esch