Skip to content

Commit 7df0d90

Browse files
committed
Dont delete count matrix folder for CITE-seq
1 parent d70dd5d commit 7df0d90

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/CellHashingHandler.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,11 @@ public void processFilesRemote(List<Readset> readsets, JobContext ctx) throws Un
299299
{
300300
ctx.getLogger().debug("HTO calls will not be generated");
301301

302-
File citeSeqCount = (File) callMap.get("citeSeqCount");
302+
File citeSeqCount = (File) callMap.get("citeSeqCountMatrix");
303303
ctx.getFileManager().addSequenceOutput(citeSeqCount, rs.getName() + ": CITE-Seq Count Matrix","CITE-Seq Count Matrix", rs.getReadsetId(), null, null, null);
304+
305+
File outDir = (File) callMap.get("outDir");
306+
ctx.getFileManager().removeIntermediateFile(outDir);
304307
}
305308

306309
File origUnknown = getCiteSeqCountUnknownOutput(ctx.getSourceDirectory(), bestEditDistance);
@@ -390,7 +393,8 @@ private Map<String, Object> executeCiteSeqCount(JobContext ctx, RecordedAction a
390393
ctx.getFileManager().addIntermediateFile(outputDir);
391394

392395
Map<String, Object> callMap = new HashMap<>();
393-
callMap.put("citeSeqCount", outputMatrix);
396+
callMap.put("citeSeqCountMatrix", outputMatrix);
397+
callMap.put("outputDir", outputDir);
394398

395399
if (generateHtoCalls)
396400
{

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/TaskFileManagerImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,12 @@ public void deleteIntermediateFiles() throws PipelineJobException
692692

693693
if (f.getParentFile().listFiles().length == 0)
694694
{
695+
//Do not delete the primary working directory
696+
if (_wd != null && _wd.getDir().equals(f.getParentFile()))
697+
{
698+
continue;
699+
}
700+
695701
_job.getLogger().debug("\talso deleting empty parent folder: " + f.getParentFile().getPath());
696702
f.getParentFile().delete();
697703
}

0 commit comments

Comments
 (0)