magarveylab / prism-releases

PRISM source code public releases
8 stars 4 forks source link

NullPointerException #3

Closed tomas-pluskal closed 7 years ago

tomas-pluskal commented 7 years ago

Hi,

I got PRISM running in command line. It reports some NullPointerException to the console (although it finishes the run).

Generating predicted scaffolds for cluster 7...
NONE
[OrfPermuter] Getting all permutations for cluster 7
[OrfPermuter] Permuting 0 orfs
[OrfPermuter] Generated 1 permutations
[ModulePermuter] Generated 1 total module permutations
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for ACYLTRANSFERASE
[ModularAnnotator] Couldn't find module for domain orf_180|25|74
Got annotator ca.mcmaster.magarveylab.prism.cluster.annotation.impl.ReductiveLoopAnnotator for domain DEHYDRATASE
Identified 0 substrates for DEHYDRATASE
Identified 0 substrates for THIOLATION
[ReactionPlanGenerator] Combinatorializing a list of 0 reaction plans
[ReactionPlanGenerator] Generating all combinations from a space of 1
[ReactionPlanGenerator] Generated 1 combinations of reaction plans
[CombinatorialPlanGenerator] Generated 1 combinatorial plans for cluster 7
Generating scaffold 1 of a maximum 50 for cluster 7...
[LibraryGenerator] Executing combinatorial plan 0
[StructureGenerator] Generating new scaffold with 0 modules
null
java.lang.NullPointerException
    at ca.mcmaster.magarveylab.prism.cluster.reactions.ScaffoldReactions.finishScaffold(ScaffoldReactions.java:102)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.StructureGenerator.generateLinearScaffold(StructureGenerator.java:102)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.StructureGenerator.generateScaffold(StructureGenerator.java:68)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.LibraryGenerator.combinatorializeScaffold(LibraryGenerator.java:138)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.LibraryGenerator.generate(LibraryGenerator.java:81)
    at ca.mcmaster.magarveylab.prism.Prism.generateScaffolds(Prism.java:213)
    at ca.mcmaster.magarveylab.prism.Prism.run(Prism.java:76)
    at ca.mcmaster.magarveylab.prism.PrismDesktop.main(PrismDesktop.java:98)
[LibraryGenerator] Exhausted all combinatorial plans, exiting scaffold generation loop
[LibraryGenerator] Generated new library of 0 scaffolds with reaction count 0
Generating predicted scaffolds for cluster 8...
NONE
[OrfPermuter] Getting all permutations for cluster 8
[OrfPermuter] Permuting 0 orfs
[OrfPermuter] Generated 1 permutations
[ModulePermuter] Generated 1 total module permutations
Identified 0 substrates for THIOLATION
[ModularAnnotator] Couldn't find module for domain orf_119|35|127
Got annotator ca.mcmaster.magarveylab.prism.cluster.annotation.impl.ReductiveLoopAnnotator for domain KETOREDUCTASE
Identified 0 substrates for KETOREDUCTASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for ACYLTRANSFERASE
[ModularAnnotator] Couldn't find module for domain orf_124|648|682
Got annotator ca.mcmaster.magarveylab.prism.cluster.annotation.impl.ReductiveLoopAnnotator for domain DEHYDRATASE
Identified 0 substrates for DEHYDRATASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
[ReactionPlanGenerator] Combinatorializing a list of 0 reaction plans
[ReactionPlanGenerator] Generating all combinations from a space of 1
[ReactionPlanGenerator] Generated 1 combinations of reaction plans
[CombinatorialPlanGenerator] Generated 1 combinatorial plans for cluster 8
Generating scaffold 1 of a maximum 50 for cluster 8...
[LibraryGenerator] Executing combinatorial plan 0
[StructureGenerator] Generating new scaffold with 0 modules
null
java.lang.NullPointerException
    at ca.mcmaster.magarveylab.prism.cluster.reactions.ScaffoldReactions.finishScaffold(ScaffoldReactions.java:102)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.StructureGenerator.generateLinearScaffold(StructureGenerator.java:102)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.StructureGenerator.generateScaffold(StructureGenerator.java:68)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.LibraryGenerator.combinatorializeScaffold(LibraryGenerator.java:138)
    at ca.mcmaster.magarveylab.prism.cluster.scaffold.LibraryGenerator.generate(LibraryGenerator.java:81)
    at ca.mcmaster.magarveylab.prism.Prism.generateScaffolds(Prism.java:213)
    at ca.mcmaster.magarveylab.prism.Prism.run(Prism.java:76)
    at ca.mcmaster.magarveylab.prism.PrismDesktop.main(PrismDesktop.java:98)
[LibraryGenerator] Exhausted all combinatorial plans, exiting scaffold generation loop
[LibraryGenerator] Generated new library of 0 scaffolds with reaction count 0
Generating predicted scaffolds for cluster 9...
POSITIVE
[OrfPermuter] Getting colinear permutation for cluster 9
[OrfPermuter] Generated 1 permutations
[ModulePermuter] Generated 1 total module permutations
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for KETOSYNTHASE
Identified 0 substrates for ACYLTRANSFERASE
Identified 0 substrates for PRODUCT_TEMPLATE_I
Identified 0 substrates for THIOLATION
Identified 0 substrates for THIOLATION
[ReactionPlanGenerator] Combinatorializing a list of 0 reaction plans
[ReactionPlanGenerator] Generating all combinations from a space of 1
[ReactionPlanGenerator] Generated 1 combinations of reaction plans
[CombinatorialPlanGenerator] Generated 1 combinatorial plans for cluster 9
Generating scaffold 1 of a maximum 50 for cluster 9...
[LibraryGenerator] Executing combinatorial plan 0
[StructureGenerator] Generating new scaffold with 1 modules
[ScaffoldReactions] Started scaffold with SMILES O=CC
[ScaffoldReactions] Finished scaffold with SMILES O=C(O)C
[LibraryGenerator] Generated scaffold with SMILES O=C(O)C
[LibraryGenerator] Exhausted all combinatorial plans, exiting scaffold generation loop
[LibraryGenerator] Generated new library of 1 scaffolds with reaction count 0
Generating output...
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[PrismFileWriter] Generated JSON file
Analysis complete!
Writing report for cluster 1 report...
[ClusterReport] Error: no contig graph object
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
Writing report for cluster 2 report...
[ClusterReport] Error: no contig graph object
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
Writing report for cluster 3 report...
[ClusterReport] Error: no contig graph object
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
Writing report for cluster 4 report...
[ClusterReport] Error: no contig graph object
Writing report for cluster 5 report...
[ClusterReport] Error: no contig graph object
Writing report for cluster 6 report...
[ClusterReport] Error: no contig graph object
Writing report for cluster 7 report...
[ClusterReport] Error: no contig graph object
Writing report for cluster 8 report...
[ClusterReport] Error: no contig graph object
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
Writing report for cluster 9 report...
[ClusterReport] Error: no contig graph object
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[DomainsUtil] Found starter KS domain matching TetA_BAE93722_KS1
[Prism] Terminated.
nishanthmerwin commented 7 years ago

Looking at that error, it should be fine. All it's trying to do is generate a structure from a biosynthetic gene cluster that doesn't seem to identify any substrates (e.g. no adenylation / acyl-transferase domains). So, there's a function in there that calls getLastResidue, and when the number of residues is 0, it throws a NullPointerException. This gets handled, and then the reaction completes.

This should be the expected behaviour.

tomas-pluskal commented 7 years ago

OK, thanks for the explanation.