Skip to content

Commit 003dfae

Browse files
committed
Add param to force re-processing of cell hashing
1 parent de92181 commit 003dfae

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

singlecell/api-src/org/labkey/api/singlecell/CellHashingService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public static class CellHashingParameters
112112
public boolean keepMarkdown = false;
113113
public File h5File = null;
114114
public boolean doTSNE = false;
115+
public boolean doNotAllowResume = false;
115116

116117
private CellHashingParameters()
117118
{
@@ -128,6 +129,7 @@ public static CellHashingService.CellHashingParameters createFromStep(SequenceOu
128129
ret.minAllowableDoubletRateFilter = step.getProvider().getParameterByName("minAllowableDoubletRateFilter").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Double.class, null);
129130
ret.callerDisagreementThreshold = step.getProvider().getParameterByName("callerDisagreementThreshold").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Double.class, null);
130131
ret.doTSNE = step.getProvider().getParameterByName("doTSNE").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, false);
132+
ret.doNotAllowResume = step.getProvider().getParameterByName("doNotAllowResume").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, false);
131133
ret.retainRawCountFile = step.getProvider().getParameterByName("retainRawCountFile").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, true);
132134
ret.failIfUnexpectedHtosFound = step.getProvider().getParameterByName("failIfUnexpectedHtosFound").extractValue(ctx.getJob(), step.getProvider(), step.getStepIdx(), Boolean.class, true);
133135
ret.htoReadset = htoReadset;
@@ -171,6 +173,7 @@ public static CellHashingParameters createFromJson(BARCODE_TYPE type, File webse
171173
ret.minAllowableDoubletRateFilter = params.get("minAllowableDoubletRateFilter") == null ? null : params.getDouble("minAllowableDoubletRateFilter");
172174
ret.callerDisagreementThreshold = params.get("callerDisagreementThreshold") == null ? null : params.getDouble("callerDisagreementThreshold");
173175
ret.doTSNE = params.optBoolean("doTSNE", false);
176+
ret.doNotAllowResume = params.optBoolean("doNotAllowResume", false);
174177
ret.retainRawCountFile = params.optBoolean("retainRawCountFile", true);
175178
ret.failIfUnexpectedHtosFound = params.optBoolean("failIfUnexpectedHtosFound", true);
176179
ret.htoReadset = htoReadset;

singlecell/src/org/labkey/singlecell/CellHashingServiceImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ public File generateHashingCallsForRawMatrix(Readset parentReadset, PipelineOutp
627627
String outputBasename = parameters.getBasename() + "." + parameters.type.name();
628628
File callsFile = getExpectedCallsFile(ctx.getOutputDir(), outputBasename);
629629
File doneFile = new File(callsFile.getPath() + ".done");
630+
if (doneFile.exists() & parameters.doNotAllowResume)
631+
{
632+
ctx.getLogger().debug("doneFile exists, but doNotAllowResume was selected");
633+
doneFile.delete();
634+
}
635+
630636
if (!doneFile.exists())
631637
{
632638
callsFile = generateCellHashingCalls(rawCountMatrixDir, ctx.getOutputDir(), outputBasename, ctx.getLogger(), ctx.getSourceDirectory(), parameters);

0 commit comments

Comments
 (0)