Skip to content

Commit 760c35d

Browse files
committed
Allow CellRangerVDH to more easily skip BAM creation
1 parent 4b3375e commit 760c35d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ public AlignmentStep.AlignmentOutput performAlignment(Readset rs, List<File> inp
394394
lockFile.delete();
395395
}
396396

397+
boolean discardBam = getProvider().getParameterByName(AbstractAlignmentStepProvider.DISCARD_BAM).extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), Boolean.class, false);
398+
args.add("--create-bam=" + !discardBam);
399+
397400
getWrapper().execute(args);
398401

399402
File outdir = new File(outputDirectory, id);
@@ -454,7 +457,6 @@ public AlignmentStep.AlignmentOutput performAlignment(Readset rs, List<File> inp
454457
private File processOutputsForType(String sampleId, Readset rs, ReferenceGenome referenceGenome, File outdir, AlignmentOutputImpl output, String subdirName) throws PipelineJobException
455458
{
456459
boolean isPrimaryDir = "vdj_t".equals(subdirName);
457-
String chainType = "vdj_t".equals(subdirName) ? "Alpha/Beta" : "Gamma/Delta";
458460

459461
File multiDir = new File(outdir, "multi/" + subdirName);
460462
if (!multiDir.exists())
@@ -487,13 +489,14 @@ private File processOutputsForType(String sampleId, Readset rs, ReferenceGenome
487489
}
488490
}
489491

492+
boolean discardBam = getProvider().getParameterByName(AbstractAlignmentStepProvider.DISCARD_BAM).extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), Boolean.class, false);
490493
File bam = new File(sampleDir, "all_contig.bam");
491-
if (!bam.exists())
494+
if (!discardBam && !bam.exists())
492495
{
493496
throw new PipelineJobException("Unable to find file: " + bam.getPath());
494497
}
495498

496-
if (isPrimaryDir)
499+
if (!discardBam && isPrimaryDir)
497500
{
498501
output.setBAM(bam);
499502
}

0 commit comments

Comments
 (0)