Skip to content

Commit d68e549

Browse files
committed
Bugfix to cell hashing and rename variables to make purpose clearer
1 parent a801a77 commit d68e549

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static public void setInstance(CellHashingService instance)
4444
_instance = instance;
4545
}
4646

47-
abstract public void prepareHashingForVdjIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashing) throws PipelineJobException;
47+
abstract public void prepareHashingForVdjIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashingReadset) throws PipelineJobException;
4848

4949
abstract public File generateHashingCallsForRawMatrix(Readset parentReadset, PipelineOutputTracker output, SequenceOutputHandler.JobContext ctx, CellHashingParameters parameters, File rawCountMatrixDir) throws PipelineJobException;
5050

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ public static CellHashingServiceImpl get()
8989
}
9090

9191
@Override
92-
public void prepareHashingForVdjIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashing) throws PipelineJobException
92+
public void prepareHashingForVdjIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashingReadset) throws PipelineJobException
9393
{
94-
prepareHashingAndCiteSeqFilesIfNeeded(sourceDir, job, support, filterField, failIfNoHashing, false, true, true, false, false);
94+
prepareHashingAndCiteSeqFilesIfNeeded(sourceDir, job, support, filterField, failIfNoHashingReadset, false, true, true, false, false);
9595
}
9696

97-
public void prepareHashingAndCiteSeqFilesForFeatureCountsIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashing, final boolean failIfNoCiteSeq) throws PipelineJobException
97+
public void prepareHashingAndCiteSeqFilesForFeatureCountsIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashingReadset, final boolean failIfNoCiteSeqReadset) throws PipelineJobException
9898
{
99-
prepareHashingAndCiteSeqFilesIfNeeded(sourceDir, job, support, filterField, failIfNoHashing, failIfNoCiteSeq, true, true, true, false);
99+
prepareHashingAndCiteSeqFilesIfNeeded(sourceDir, job, support, filterField, failIfNoHashingReadset, failIfNoCiteSeqReadset, true, false, false, false);
100100
}
101101

102-
public void prepareHashingAndCiteSeqFilesIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashing, final boolean failIfNoCiteSeq, final boolean cacheCountMatrixFiles, boolean requireValidHashingIfPresent, boolean requireValidCiteSeqIfPresent, boolean doH5Caching) throws PipelineJobException
102+
public void prepareHashingAndCiteSeqFilesIfNeeded(File sourceDir, PipelineJob job, SequenceAnalysisJobSupport support, String filterField, final boolean failIfNoHashingReadset, final boolean failIfNoCiteSeqReadset, final boolean cacheCountMatrixFiles, boolean requireExistingHashingCountsIfUsed, boolean requireExistingCiteSeqCountIfUsed, boolean doH5Caching) throws PipelineJobException
103103
{
104104
Container target = job.getContainer().isWorkbook() ? job.getContainer().getParent() : job.getContainer();
105105
UserSchema sequenceAnalysis = QueryService.get().getUserSchema(job.getUser(), target, SingleCellSchema.SEQUENCE_SCHEMA_NAME);
@@ -287,7 +287,7 @@ public void prepareHashingAndCiteSeqFilesIfNeeded(File sourceDir, PipelineJob jo
287287
TableSelector ts = new TableSelector(sequenceOutputs, filter, new org.labkey.api.data.Sort("-rowid"));
288288
if (!ts.exists())
289289
{
290-
if (requireValidHashingIfPresent)
290+
if (requireExistingHashingCountsIfUsed)
291291
{
292292
throw new IllegalArgumentException("Unable to find existing count matrix for hashing readset: " + hashingReadsetId);
293293
}
@@ -346,7 +346,7 @@ else if (distinctHTOs.size() == 1)
346346
TableSelector ts = new TableSelector(sequenceOutputs, filter, new org.labkey.api.data.Sort("-rowid"));
347347
if (!ts.exists())
348348
{
349-
if (requireValidCiteSeqIfPresent)
349+
if (requireExistingCiteSeqCountIfUsed)
350350
{
351351
throw new IllegalArgumentException("Unable to find existing count matrix for CITE-seq readset: " + citeseqReadsetId);
352352
}
@@ -416,12 +416,12 @@ else if (distinctHTOs.size() == 1)
416416

417417
writeCiteSeqBarcodes(job, gexToPanels, sourceDir);
418418

419-
if (failIfNoHashing && readsetToHashingMap.isEmpty())
419+
if (failIfNoHashingReadset && readsetToHashingMap.isEmpty())
420420
{
421421
throw new PipelineJobException("Readsets do not use cell hashing");
422422
}
423423

424-
if (failIfNoCiteSeq && readsetToCiteSeqMap.isEmpty())
424+
if (failIfNoCiteSeqReadset && readsetToCiteSeqMap.isEmpty())
425425
{
426426
throw new PipelineJobException("Readsets do not use CITE-seq");
427427
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,24 +115,24 @@ public void init(PipelineJob job, SequenceAnalysisJobSupport support, List<Reads
115115
}
116116

117117
String field;
118-
boolean failIfNoHashing = false;
119-
boolean failIfNoCiteseq = false;
118+
boolean failIfNoHashingReadset = false;
119+
boolean failIfNoCiteseqReadset = false;
120120
if (rs.getApplication().equals("Cell Hashing"))
121121
{
122122
field = "hashingReadsetId";
123-
failIfNoHashing = true;
123+
failIfNoHashingReadset = true;
124124
}
125125
else if (rs.getApplication().equals("CITE-Seq"))
126126
{
127127
field = "citeseqReadsetId";
128-
failIfNoCiteseq = true;
128+
failIfNoCiteseqReadset = true;
129129
}
130130
else
131131
{
132132
throw new PipelineJobException("Unexpected application: " + rs.getApplication());
133133
}
134134

135-
CellHashingServiceImpl.get().prepareHashingAndCiteSeqFilesForFeatureCountsIfNeeded(outputDir, job, support, field, failIfNoHashing, failIfNoCiteseq);
135+
CellHashingServiceImpl.get().prepareHashingAndCiteSeqFilesForFeatureCountsIfNeeded(outputDir, job, support, field, failIfNoHashingReadset, failIfNoCiteseqReadset);
136136

137137
boolean useGEX = params.optBoolean("useGEX", false);
138138
if (useGEX)

0 commit comments

Comments
 (0)