Skip to content

Commit d569189

Browse files
committed
Switch nimble to pass align-specific tempDir on the command line, rather than use environment
1 parent c0af553 commit d569189

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

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

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,25 @@ private Map<NimbleGenome, File> doAlignment(List<NimbleGenome> genomes, List<Fil
438438
alignArgs.add("--input");
439439
alignArgs.add(bam.getPath());
440440

441+
// Create temp folder:
442+
File tmpDir = new File(getPipelineCtx().getWorkingDirectory(), "tmpDir");
443+
if (tmpDir.exists())
444+
{
445+
try
446+
{
447+
FileUtils.deleteDirectory(tmpDir);
448+
Files.createDirectory(tmpDir.toPath());
449+
}
450+
catch (IOException e)
451+
{
452+
throw new PipelineJobException(e);
453+
}
454+
}
455+
output.addIntermediateFile(tmpDir);
456+
457+
alignArgs.add("--tmpdir");
458+
alignArgs.add(tmpDir.getPath());
459+
441460
boolean dockerRan = runUsingDocker(alignArgs, output, "align.all");
442461
for (NimbleGenome genome : genomes)
443462
{
@@ -552,23 +571,7 @@ private static boolean runUsingDocker(List<String> nimbleArgs, PipelineStepOutpu
552571
wrapper.setWorkingDir(ctx.getWorkingDirectory());
553572
wrapper.setEntryPoint("/bin/bash");
554573

555-
// Create temp folder:
556-
File tmpDir = new File(ctx.getWorkingDirectory(), "tmpDir");
557-
if (tmpDir.exists())
558-
{
559-
try
560-
{
561-
FileUtils.deleteDirectory(tmpDir);
562-
Files.createDirectory(tmpDir.toPath());
563-
}
564-
catch (IOException e)
565-
{
566-
throw new PipelineJobException(e);
567-
}
568-
}
569-
output.addIntermediateFile(tmpDir);
570574
wrapper.setTmpDir(null);
571-
wrapper.addToEnvironment("TMPDIR", tmpDir.getPath());
572575

573576
wrapper.addToEnvironment("RUST_BACKTRACE", "1");
574577

0 commit comments

Comments
 (0)