Skip to content

Commit 2cfc078

Browse files
committed
Ensure nimble alignment file copied locally for docker
1 parent edc37be commit 2cfc078

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,18 +670,23 @@ private static boolean runUsingDocker(List<String> nimbleArgs, PipelineStepOutpu
670670
}
671671

672672
private File ensureLocalCopy(File input, PipelineStepOutput output) throws PipelineJobException
673+
{
674+
return ensureLocalCopy(input, output, getPipelineCtx());
675+
}
676+
677+
public static File ensureLocalCopy(File input, PipelineStepOutput output, PipelineContext ctx) throws PipelineJobException
673678
{
674679
try
675680
{
676-
if (getPipelineCtx().getWorkingDirectory().equals(input.getParentFile()))
681+
if (ctx.getWorkingDirectory().equals(input.getParentFile()))
677682
{
678683
return input;
679684
}
680685

681-
File local = new File(getPipelineCtx().getWorkingDirectory(), input.getName());
686+
File local = new File(ctx.getWorkingDirectory(), input.getName());
682687
if (!local.exists())
683688
{
684-
getPipelineCtx().getLogger().debug("Copying file locally: " + input.getPath());
689+
ctx.getLogger().debug("Copying file locally: " + input.getPath());
685690
FileUtils.copyFile(input, local);
686691
}
687692

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
115115
}
116116

117117
// This will update these files in-place:
118-
File reportFile = NimbleHelper.runNimbleReport(alignmentFile, so.getLibrary_id(), output, ctx);
118+
File alignmentFileLocal = NimbleHelper.ensureLocalCopy(alignmentFile);
119+
File reportFile = NimbleHelper.runNimbleReport(alignmentFileLocal, so.getLibrary_id(), output, ctx);
119120
if (!reportFile.exists())
120121
{
121122
throw new PipelineJobException("Unable to find file: " + reportFile.getPath());

0 commit comments

Comments
 (0)