Skip to content

Commit e685ce5

Browse files
committed
Bugfix to demuxEM with TCR data
1 parent a35d85d commit e685ce5

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJCellHashingHandler.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class CellRangerVDJCellHashingHandler extends AbstractParameterizedOutput
4545

4646
public static final String TARGET_ASSAY = "targetAssay";
4747
public static final String DELETE_EXISTING_ASSAY_DATA = "deleteExistingAssayData";
48-
public static final String USE_GEX_BARCODES = "useGexBarcodes";
4948

5049
public CellRangerVDJCellHashingHandler()
5150
{
@@ -205,6 +204,27 @@ private void processVloupeFile(JobContext ctx, File perCellTsv, Readset rs, Reco
205204
parameters.basename = FileUtil.makeLegalName(rs.getName());
206205
parameters.allowableHtoBarcodes = htosPerReadset;
207206

207+
// If demuxEM used:
208+
if (parameters.methods.contains(CellHashingService.CALLING_METHOD.demuxem) || parameters.consensusMethods.contains(CellHashingService.CALLING_METHOD.demuxem))
209+
{
210+
ctx.getLogger().debug("demuxEM is used, adding H5 file");
211+
if (genomeId == null)
212+
{
213+
genomeId = ctx.getSequenceSupport().getCachedGenomes().iterator().next().getGenomeId();
214+
ctx.getLogger().debug("Unable to infer genome ID from output, defaulting to the first cached genome: " + genomeId);
215+
}
216+
217+
parameters.h5File = CellHashingService.get().getH5FileForGexReadset(ctx.getSequenceSupport(), rs.getReadsetId(), genomeId);
218+
if (parameters.h5File == null)
219+
{
220+
throw new PipelineJobException("Unable to find h5 file for: " + rs.getRowId());
221+
}
222+
else if (!parameters.h5File.exists())
223+
{
224+
throw new PipelineJobException("h5 file does not exist: " + parameters.h5File.getPath());
225+
}
226+
}
227+
208228
parameters.cellBarcodeWhitelistFile = createCellbarcodeWhitelist(ctx, perCellTsv, true);
209229
File existingCountMatrixUmiDir = CellHashingService.get().getExistingFeatureBarcodeCountDir(rs, CellHashingService.BARCODE_TYPE.hashing, ctx.getSequenceSupport());
210230

0 commit comments

Comments
 (0)