Skip to content

Commit f24538b

Browse files
committed
Ensure outputs are tracked
1 parent f26126f commit f24538b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.labkey.api.sequenceanalysis.pipeline.SequencePipelineService;
2020
import org.labkey.api.sequenceanalysis.pipeline.ToolParameterDescriptor;
2121
import org.labkey.api.sequenceanalysis.run.SimpleScriptWrapper;
22-
import org.labkey.api.singlecell.CellHashingService;
2322
import org.labkey.api.util.FileUtil;
2423
import org.labkey.api.writer.PrintWriters;
2524
import org.labkey.singlecell.CellHashingServiceImpl;
@@ -30,6 +29,7 @@
3029
import java.io.PrintWriter;
3130
import java.util.ArrayList;
3231
import java.util.Arrays;
32+
import java.util.Date;
3333
import java.util.List;
3434

3535
public class CellRangerFeatureBarcodeHandler extends AbstractParameterizedOutputHandler<SequenceOutputHandler.SequenceReadsetProcessor>
@@ -122,6 +122,9 @@ public void processFilesOnWebserver(PipelineJob job, SequenceAnalysisJobSupport
122122
@Override
123123
public void processFilesRemote(List<Readset> readsets, JobContext ctx) throws UnsupportedOperationException, PipelineJobException
124124
{
125+
RecordedAction action = new RecordedAction(getName());
126+
action.setStartTime(new Date());
127+
125128
if (readsets.size() != 1)
126129
{
127130
throw new PipelineJobException("This step was designed to operate on a single readset. It should have been automatically split upstream. Total: " + readsets.size());
@@ -161,6 +164,8 @@ else if (rs.getApplication().equals("CITE-Seq"))
161164
List<Pair<File, File>> inputFastqs = new ArrayList<>();
162165
rs.getReadData().forEach(rd -> {
163166
inputFastqs.add(Pair.of(rd.getFile1(), rd.getFile2()));
167+
output.addIntermediateFile(rd.getFile1(), "Input FASTQ");
168+
output.addIntermediateFile(rd.getFile2(), "Input FASTQ");
164169
});
165170

166171
List<String> args = wrapper.prepareCountArgs(output, id, ctx.getOutputDir(), rs, inputFastqs, extraArgs, false);
@@ -227,10 +232,11 @@ else if (rs.getApplication().equals("CITE-Seq"))
227232
if (rawCounts.exists())
228233
{
229234
output.addSequenceOutput(rawCounts, rs.getName() + ": " + rs.getApplication() + " Raw Counts", category, rs.getRowId(), null, null, null);
235+
output.addOutput(rawCounts, "Count Matrix");
230236
}
231237
else
232238
{
233-
ctx.getLogger().info("Count dir not found: " + rawCounts.getPath());
239+
throw new PipelineJobException("Count dir not found: " + rawCounts.getPath());
234240
}
235241
}
236242
catch (IOException e)
@@ -249,6 +255,8 @@ else if (rs.getApplication().equals("CITE-Seq"))
249255
{
250256
ctx.getLogger().warn("Unable to find folder: " + directory.getPath());
251257
}
258+
259+
ctx.getFileManager().addStepOutputs(action, output);
252260
}
253261

254262
private File makeDummyIndex(JobContext ctx) throws PipelineJobException

0 commit comments

Comments
 (0)