Skip to content

Commit d6fe4ae

Browse files
committed
Reduce length of filenames in single cell pipelines
1 parent b21f423 commit d6fe4ae

21 files changed

+118
-2
lines changed

singlecell/api-src/org/labkey/api/singlecell/pipeline/SingleCellStep.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ default boolean createsSeuratObjects()
3636

3737
public boolean isIncluded(SequenceOutputHandler.JobContext ctx, List<SequenceOutputFile> inputs) throws PipelineJobException;
3838

39+
default String getFileSuffix()
40+
{
41+
return getProvider().getName();
42+
}
43+
3944
public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWrapper> inputObjects, String outputPrefix) throws PipelineJobException;
4045

4146
public static interface Output extends PipelineStepOutput

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ else if (step.createsSeuratObjects())
322322
currentFiles.forEach(currentFile -> action.addInput(currentFile.getFile(), "Input Seurat Object"));
323323
ctx.getFileManager().addIntermediateFiles(currentFiles.stream().map(SingleCellStep.SeuratObjectWrapper::getFile).collect(Collectors.toList()));
324324

325-
outputPrefix = outputPrefix + "." + step.getProvider().getName() + (step.getStepIdx() == 0 ? "" : "-" + step.getStepIdx());
325+
outputPrefix = outputPrefix + "." + step.getFileSuffix() + (step.getStepIdx() == 0 ? "" : "-" + step.getStepIdx());
326326
SingleCellStep.Output output = step.execute(ctx, currentFiles, outputPrefix);
327327

328328
_resumer.getFileManager().addStepOutputs(action, output);

singlecell/src/org/labkey/singlecell/pipeline/singlecell/AppendCiteSeq.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ private static List<ToolParameterDescriptor> getParams()
6161
return ret;
6262
}
6363

64+
@Override
65+
public String getFileSuffix()
66+
{
67+
return "cite";
68+
}
69+
6470
@Override
6571
public Collection<String> getRLibraries()
6672
{

singlecell/src/org/labkey/singlecell/pipeline/singlecell/AvgExpression.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ public AvgExpression create(PipelineContext ctx)
3333
}
3434
}
3535

36+
@Override
37+
public String getFileSuffix()
38+
{
39+
return "avg";
40+
}
41+
3642
@Override
3743
public boolean createsSeuratObjects()
3844
{

singlecell/src/org/labkey/singlecell/pipeline/singlecell/CiteSeqDimRedux.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ public CiteSeqDimRedux create(PipelineContext ctx)
2828
return new CiteSeqDimRedux(ctx, this);
2929
}
3030
}
31+
32+
@Override
33+
public String getFileSuffix()
34+
{
35+
return "cite-dr";
36+
}
3137
}

singlecell/src/org/labkey/singlecell/pipeline/singlecell/CiteSeqWnn.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ public CiteSeqWnn create(PipelineContext ctx)
2828
return new CiteSeqWnn(ctx, this);
2929
}
3030
}
31+
32+
@Override
33+
public String getFileSuffix()
34+
{
35+
return "wnn";
36+
}
3137
}

singlecell/src/org/labkey/singlecell/pipeline/singlecell/DimPlots.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ public boolean createsSeuratObjects()
4949
{
5050
return false;
5151
}
52+
53+
@Override
54+
public String getFileSuffix()
55+
{
56+
return "dimplot";
57+
}
5258
}

singlecell/src/org/labkey/singlecell/pipeline/singlecell/DoubletFinder.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ public DoubletFinder create(PipelineContext ctx)
3232
return new DoubletFinder(ctx, this);
3333
}
3434
}
35+
36+
@Override
37+
public String getFileSuffix()
38+
{
39+
return "df";
40+
}
3541
}

singlecell/src/org/labkey/singlecell/pipeline/singlecell/Downsample.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ public Downsample create(PipelineContext ctx)
3939
return new Downsample(ctx, this);
4040
}
4141
}
42+
43+
@Override
44+
public String getFileSuffix()
45+
{
46+
return "ds";
47+
}
4248
}

singlecell/src/org/labkey/singlecell/pipeline/singlecell/FilterRawCounts.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@ public FilterRawCounts create(PipelineContext ctx)
5050
return new FilterRawCounts(ctx, this);
5151
}
5252
}
53+
54+
@Override
55+
public String getFileSuffix()
56+
{
57+
return "frc";
58+
}
5359
}

0 commit comments

Comments
 (0)