mdcao / japsa

Just Another JAva Package for Sequence Analysis
BSD 3-Clause "New" or "Revised" License
24 stars 14 forks source link

Resistance profiling Exception in thread "SSS" java.lang.NullPointerException #12

Closed mbhall88 closed 7 years ago

mbhall88 commented 7 years ago

Getting an error when trying to run jsa.np.rtResistGenes.

Example script that is being used to run is

jsa.np.npreader --folder=$1 --output=- | \                                      
     bwa mem -t12 -x ont2d -K10000 ${2}/${DB_NAME} - 2> /dev/null | \                                                                                                                                                                                                                                                                                                  
     jsa.np.rtResistGenes --output=$3 --bamFile=- --resDB=$2 --time=180 --tmp=tmp/resTest

This same npReader/bwa mem combination works fine with jsa.np.rtSpeciesTyping.

There are no errors coming from bwa mem or npReader. The resistance profiler seems to start fine but returns an error. Stack trace provided:

[main] INFO japsa.tools.bio.np.NanoporeReaderCmd - Start reading
[main] INFO japsa.seq.nanopore.NanoporeReaderStream - Start reading /DataOnline/Data/Nanopore/GN_003_R9_2D_20160928/reads/downloads/pass/
[main] INFO japsa.seq.nanopore.NanoporeReaderStream - Start reading  1495696853857
[main] INFO japsa.bio.np.RealtimeResistanceGene - geneList = 280
[main] INFO japsa.bio.np.RealtimeResistanceGene - geneMap = 280
[main] INFO japsa.bio.np.RealtimeResistanceGene - gene2Group = 609
[main] INFO japsa.bio.np.RealtimeResistanceGene - gene2GeneName = 609
[main] INFO japsa.bio.np.RealtimeResistanceGene - Resistance identification ready at Thu May 25 07:20:53 UTC 2017
[SSS] INFO japsa.bio.np.RealtimeAnalysis - Start analysing data at Thu May 25 07:20:55 UTC 2017
Exception in thread "SSS" java.lang.NullPointerException
        at japsa.bio.np.ErrorCorrection.consensusSequence(ErrorCorrection.java:94)
        at japsa.bio.np.RealtimeResistanceGene$ResistanceGeneFinder.antiBioticsProfile(RealtimeResistanceGene.java:261)
        at japsa.bio.np.RealtimeResistanceGene$ResistanceGeneFinder.antiBioticAnalysis(RealtimeResistanceGene.java:233)
        at japsa.bio.np.RealtimeResistanceGene$ResistanceGeneFinder.analysis(RealtimeResistanceGene.java:439)
        at japsa.bio.np.RealtimeAnalysis.run(RealtimeAnalysis.java:114)
        at java.lang.Thread.run(Thread.java:745)
[main] INFO japsa.seq.nanopore.NanoporeReaderStream - EXITING
[main] INFO japsa.seq.nanopore.NanoporeReaderStream - npReader closing
[main] INFO japsa.seq.nanopore.NanoporeReaderStream - npReader closed
[main] INFO japsa.bio.np.RealtimeAnalysis - All reads received at Thu May 25 08:07:09 UTC 2017
[main] INFO japsa.bio.np.RealtimeResistanceGene - END : Thu May 25 08:07:09 UTC 2017

Example of how I ran the above script is:

./japsaSTtest.sh /DataOnline/Data/Nanopore/GN_003_R9_2D_20160928/reads/downloads/pass/ /DataOnline/Data/Bacterial_Genome/Eskape/ResistanceGenes/resFinder/ - 2> error.log
hsnguyen commented 7 years ago

Fixed!