Skip to content

Commit 5c1a4e4

Browse files
committed
allow velocyto to correctly find barcodes when run immediately after cellranger or later
1 parent c282829 commit 5c1a4e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ public File runVelocytoFor10x(File localBam, File gtf, File outputFolder, @Nulla
114114

115115
args.add("-b");
116116
String sampleName = CellRangerWrapper.makeLegalSampleName(rs.getName());
117-
File barcodeCSV = new File(localBam.getParentFile(), "raw_feature_bc_matrix/barcodes.tsv.gz");
117+
118+
// NOTE: depends on whether this is run immediately after cellranger or not, the BAM might exist in ./outs or might have been moved top-level:
119+
File barcodeCSV = new File(localBam.getParentFile(), (localBam.getParentFile().getName().equals("outs") ? "" : sampleName + "/outs/") + "raw_feature_bc_matrix/barcodes.tsv.gz");
118120
if (!barcodeCSV.exists())
119121
{
120122
throw new PipelineJobException("Unable to find file: " + barcodeCSV.getPath());

0 commit comments

Comments
 (0)