1919import org .labkey .api .sequenceanalysis .pipeline .SequencePipelineService ;
2020import org .labkey .api .sequenceanalysis .pipeline .ToolParameterDescriptor ;
2121import org .labkey .api .sequenceanalysis .run .SimpleScriptWrapper ;
22- import org .labkey .api .singlecell .CellHashingService ;
2322import org .labkey .api .util .FileUtil ;
2423import org .labkey .api .writer .PrintWriters ;
2524import org .labkey .singlecell .CellHashingServiceImpl ;
3029import java .io .PrintWriter ;
3130import java .util .ArrayList ;
3231import java .util .Arrays ;
32+ import java .util .Date ;
3333import java .util .List ;
3434
3535public 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