Skip to content

Commit 046dca3

Browse files
committed
Bugfix to nimble output tracking
1 parent 7aab0ec commit 046dca3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

singlecell/src/org/labkey/singlecell/run/NimbleHelper.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ public void doNimbleAlign(File bam, PipelineStepOutput output, Readset rs, Strin
185185
for (NimbleGenome genome : genomes)
186186
{
187187
File results = resultMap.get(genome);
188+
if (results == null)
189+
{
190+
throw new PipelineJobException("No output recorded for genome : " + genome.getGenomeId());
191+
}
192+
193+
if (!results.exists())
194+
{
195+
throw new PipelineJobException("Unable to find file: " + results.getPath());
196+
}
197+
188198
String description = genome.getScorePercent() > 0 ? "score_percent: " + genome.getScorePercent() : null;
189199
output.addSequenceOutput(results, basename + ": nimble align", "Nimble Alignment", rs.getRowId(), null, genome.getGenomeId(), description);
190200
}
@@ -382,7 +392,7 @@ else if (!resultsGz.exists())
382392
throw new PipelineJobException("Expected to find file: " + log.getPath());
383393
}
384394

385-
getPipelineCtx().getLogger().info("Nimble alignment stats:");
395+
getPipelineCtx().getLogger().info("Nimble alignment stats for genome :" + genome.getGenomeId());
386396
try (BufferedReader reader = Readers.getReader(log))
387397
{
388398
String line;
@@ -406,6 +416,8 @@ else if (!resultsGz.exists())
406416
{
407417
getPipelineCtx().getLogger().debug("Alignment output file not present: " + alignmentOutputFile.getName());
408418
}
419+
420+
resultMap.put(genome, resultsGz);
409421
}
410422

411423
return resultMap;

0 commit comments

Comments
 (0)