Skip to content

Commit 1842112

Browse files
committed
Dont double-create seurat object outputfile
1 parent 78c4f6c commit 1842112

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/RestoreSraDataHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ public Pair<File, File> downloadSra(String dataset, File outDir) throws Pipeline
256256

257257
args.add(dataset);
258258

259+
//NOTE: sratoolkit requires this to be set:
260+
addToEnvironment("HOME", System.getProperty("user.home"));
261+
259262
execute(args);
260263

261264
List<File> files = new ArrayList<>(Arrays.asList(Objects.requireNonNull(outDir.listFiles((dir, name) -> name.startsWith(dataset)))));

singlecell/src/org/labkey/singlecell/analysis/AbstractSingleCellHandler.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,15 @@ else if (step.createsSeuratObjects())
543543
}
544544
}
545545

546-
_resumer.getFileManager().addSequenceOutput(so);
546+
//This indicates the job processed an input file, but did not create a new object (like running FindMarkers)
547+
if (output.getSequenceOutputFileId() != null)
548+
{
549+
ctx.getLogger().info("Sequence output already exists, will not re-create output for seurat object: " + output.getSequenceOutputFileId());
550+
}
551+
else
552+
{
553+
_resumer.getFileManager().addSequenceOutput(so);
554+
}
547555

548556
// This could be a little confusing, but add one record out seurat output, even though there is one HTML file::
549557
SequenceOutputFile o = new SequenceOutputFile();

0 commit comments

Comments
 (0)