Skip to content

Commit 8711ae5

Browse files
committed
Separate requirement for hashing and cite-seq data
1 parent 01c6f24 commit 8711ae5

File tree

6 files changed

+33
-13
lines changed

6 files changed

+33
-13
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ protected List<Chunk> getChunks() throws PipelineJobException
169169
}
170170

171171
@Override
172-
public boolean requiresHashingOrCiteSeq()
172+
public boolean requiresHashing()
173+
{
174+
return false;
175+
}
176+
177+
@Override
178+
public boolean requiresCiteSeq()
173179
{
174180
return false;
175181
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ default boolean createsSeuratObjects()
3232
return true;
3333
}
3434

35-
public boolean requiresHashingOrCiteSeq();
35+
public boolean requiresCiteSeq();
36+
37+
public boolean requiresHashing();
3638

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

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,22 @@ public Processor(boolean doProcessRawCounts)
136136
@Override
137137
public void init(JobContext ctx, List<SequenceOutputFile> inputFiles, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException
138138
{
139-
boolean requiresHashingOrCite = false;
139+
boolean requiresHashing = false;
140+
boolean requiresCite = false;
140141
List<PipelineStepCtx<SingleCellStep>> steps = SequencePipelineService.get().getSteps(ctx.getJob(), SingleCellStep.class);
141142
for (PipelineStepCtx<SingleCellStep> stepCtx : steps)
142143
{
143144
SingleCellStep step = stepCtx.getProvider().create(ctx);
144145
step.init(ctx, inputFiles);
145146

146-
if (step.requiresHashingOrCiteSeq())
147+
if (step.requiresCiteSeq())
147148
{
148-
requiresHashingOrCite = true;
149+
requiresCite = true;
150+
}
151+
152+
if (step.requiresHashing())
153+
{
154+
requiresHashing = true;
149155
}
150156

151157
for (ToolParameterDescriptor pd : stepCtx.getProvider().getParameters())
@@ -159,9 +165,9 @@ public void init(JobContext ctx, List<SequenceOutputFile> inputFiles, List<Recor
159165
}
160166
}
161167

162-
if (requiresHashingOrCite)
168+
if (requiresCite || requiresHashing)
163169
{
164-
CellHashingService.get().prepareHashingAndCiteSeqFilesIfNeeded(ctx.getSourceDirectory(), ctx.getJob(), ctx.getSequenceSupport(), "readsetId", false, false);
170+
CellHashingServiceImpl.get().prepareHashingAndCiteSeqFilesIfNeeded(ctx.getSourceDirectory(), ctx.getJob(), ctx.getSequenceSupport(), "readsetId", false, false, true, requiresHashing, requiresCite);
165171
}
166172
}
167173

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,5 @@ protected String getRelativePath(File target, File outputDir)
8383
return FileUtil.relativePath(outputDir.getPath(), target.getPath());
8484
}
8585

86-
@Override
87-
public boolean requiresHashingOrCiteSeq()
88-
{
89-
return true;
90-
}
91-
9286
abstract protected Map<Integer, File> prepareCountData(SingleCellOutput output, SequenceOutputHandler.JobContext ctx, List<SeuratObjectWrapper> inputObjects, String outputPrefix) throws PipelineJobException;
9387
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ private static List<ToolParameterDescriptor> getParams()
5757
return ret;
5858
}
5959

60+
@Override
61+
public boolean requiresCiteSeq()
62+
{
63+
return true;
64+
}
65+
6066
@Override
6167
public String getFileSuffix()
6268
{

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public RunCellHashing create(PipelineContext ctx)
4242
}
4343
}
4444

45+
@Override
46+
public boolean requiresHashing()
47+
{
48+
return true;
49+
}
50+
4551
@Override
4652
public Collection<String> getRLibraries()
4753
{

0 commit comments

Comments
 (0)