Skip to content

Commit cb1cecb

Browse files
committed
Add quicker validation over unknown ADT panels
1 parent ab27e47 commit cb1cecb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@ private void writeCiteSeqBarcodes(PipelineJob job, Map<Integer, Set<String>> gex
488488
metaWriter.writeNext(new String[]{results.getString(FieldKey.fromString("antibody")), results.getString(FieldKey.fromString("antibody/adaptersequence")), name, label, results.getString(FieldKey.fromString("antibody/barcodePattern"))});
489489
});
490490

491+
if (barcodeCount.get() == 0)
492+
{
493+
throw new PipelineJobException("No barcodes found for readset: " + gexReadsetId + " with ADT panel: " + StringUtils.join(gexToPanels.get(gexReadsetId), ", "));
494+
}
495+
491496
job.getLogger().info("Total CITE-seq barcodes written: " + barcodeCount.get());
492497
}
493498
catch (IOException e)

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,22 @@ private File createFeatureRefForCiteSeq(File outputDir, File adtWhitelist) throw
379379

380380
//Example: TotalSeq-C-161,CD11b,R2,5PNNNNNNNNNN(BC),GACAAGTGATCTGCA,Antibody Capture
381381
String[] line;
382+
int total = 0;
382383
while ((line = reader.readNext()) != null)
383384
{
384385
if ("tagname".equals(line[0]))
385386
{
386387
continue;
387388
}
388389

390+
total++;
389391
writer.writeNext(new String[]{line[0], line[2].replaceAll("_", "-"), "R2", line[4], line[1], "Antibody Capture"});
390392
}
393+
394+
if (total == 0)
395+
{
396+
throw new PipelineJobException("There were no ADT features!");
397+
}
391398
}
392399
catch (IOException e)
393400
{

0 commit comments

Comments
 (0)