@@ -179,7 +179,7 @@ public void doNimbleAlign(File bam, PipelineStepOutput output, Readset rs, Strin
179179 output .addIntermediateFile (genomeFasta );
180180 output .addIntermediateFile (refJson );
181181
182- String description = genome .getScoreThreshold () > 0 ? "score_threshold : " + genome .getScoreThreshold () : null ;
182+ String description = genome .getScorePercent () > 0 ? "score_percent : " + genome .getScorePercent () : null ;
183183 output .addSequenceOutput (results , basename + ": nimble align" , "Nimble Alignment" , rs .getRowId (), null , genome .getGenomeId (), description );
184184 }
185185 }
@@ -231,6 +231,7 @@ private void updateNimbleConfigFile(File configFile, NimbleGenome genome) throws
231231 config .put ("num_mismatches" , 10 );
232232 config .put ("intersect_level" , 0 );
233233 config .put ("score_threshold" , 45 );
234+ config .put ("score_percent" , 0.75 );
234235 config .put ("score_filter" , 25 );
235236 //discard_multiple_matches: false
236237 //discard_multi_hits: ?
@@ -240,7 +241,8 @@ else if ("strict".equals(alignTemplate))
240241 {
241242 config .put ("num_mismatches" , 0 );
242243 config .put ("intersect_level" , 0 );
243- config .put ("score_threshold" , 50 );
244+ config .put ("score_percent" , 0.99 );
245+ config .put ("score_threshold" , 45 );
244246 config .put ("score_filter" , 25 );
245247 }
246248 else
@@ -255,10 +257,10 @@ else if ("strict".equals(alignTemplate))
255257
256258 config .put ("max_hits_to_report" , genome .maxHitsToReport );
257259
258- if (genome .getScoreThreshold () > 0 )
260+ if (genome .getScorePercent () > 0 )
259261 {
260- getPipelineCtx ().getLogger ().debug ("Using custom score_threshold : " + genome .getScoreThreshold ());
261- config .put ("score_threshold " , genome .getScoreThreshold ());
262+ getPipelineCtx ().getLogger ().debug ("Using custom score_percent : " + genome .getScorePercent ());
263+ config .put ("score_percent " , genome .getScorePercent ());
262264 }
263265
264266 getPipelineCtx ().getLogger ().info ("Final config:" );
@@ -487,7 +489,7 @@ private static class NimbleGenome
487489 private final String template ;
488490 private final boolean doGroup ;
489491 private final int maxHitsToReport ;
490- private final int scoreThreshold ;
492+ private final double scorePercent ;
491493
492494 public NimbleGenome (String genomeStr , int maxHitsToReport ) throws PipelineJobException
493495 {
@@ -502,7 +504,7 @@ public NimbleGenome(String genomeStr, int maxHitsToReport) throws PipelineJobExc
502504 doGroup = arr .getBoolean (2 );
503505
504506 String rawScore = arr .length () > 3 ? StringUtils .trimToNull (arr .getString (3 )) : null ;
505- scoreThreshold = rawScore == null ? -1 : Integer . parseInt (rawScore );
507+ scorePercent = rawScore == null ? -1.0 : Double . parseDouble (rawScore );
506508
507509 this .maxHitsToReport = maxHitsToReport ;
508510 }
@@ -522,9 +524,9 @@ public boolean isDoGroup()
522524 return doGroup ;
523525 }
524526
525- public int getScoreThreshold ()
527+ public double getScorePercent ()
526528 {
527- return scoreThreshold ;
529+ return scorePercent ;
528530 }
529531 }
530532
0 commit comments