@@ -77,7 +77,7 @@ else if (!gtf.exists())
7777 }
7878 }
7979
80- File loom = new VelocytoWrapper (getPipelineCtx ().getLogger ()).runVelocytoFor10x (localBam , gtf , outputDirectory , mask );
80+ File loom = new VelocytoWrapper (getPipelineCtx ().getLogger ()).runVelocytoFor10x (localBam , gtf , outputDirectory , mask , rs );
8181 output .addSequenceOutput (loom , rs .getName () + ": velocyto" , "Velocyto Counts" , rs .getReadsetId (), null , referenceGenome .getGenomeId (), null );
8282
8383 return output ;
@@ -96,7 +96,7 @@ public VelocytoWrapper(Logger log)
9696 super (log );
9797 }
9898
99- public File runVelocytoFor10x (File localBam , File gtf , File outputFolder , @ Nullable File mask ) throws PipelineJobException
99+ public File runVelocytoFor10x (File localBam , File gtf , File outputFolder , @ Nullable File mask , Readset rs ) throws PipelineJobException
100100 {
101101 // https://velocyto.org/velocyto.py/tutorial/cli.html#run10x-run-on-10x-chromium-samples
102102 // velocyto run10x -m repeat_msk.gtf mypath/sample01 somepath/refdata-cellranger-mm10-1.2.0/genes/genes.gtf
@@ -111,7 +111,8 @@ public File runVelocytoFor10x(File localBam, File gtf, File outputFolder, @Nulla
111111 args .add (outputFolder .getPath ());
112112
113113 args .add ("-b" );
114- File barcodeCSV = new File (localBam .getParentFile (), "outs/raw_feature_bc_matrix/barcodes.tsv.gz" );
114+ String sampleName = CellRangerWrapper .makeLegalSampleName (rs .getName ());
115+ File barcodeCSV = new File (localBam .getParentFile (), sampleName + "/outs/raw_feature_bc_matrix/barcodes.tsv.gz" );
115116 if (!barcodeCSV .exists ())
116117 {
117118 throw new PipelineJobException ("Unable to find file: " + barcodeCSV .getPath ());
@@ -136,7 +137,7 @@ public File runVelocytoFor10x(File localBam, File gtf, File outputFolder, @Nulla
136137
137138 wrapper .execute (args );
138139
139- File loom = new File (outputFolder , "sample .loom" );
140+ File loom = new File (outputFolder , sampleName + " .loom" );
140141 if (!loom .exists ())
141142 {
142143 throw new PipelineJobException ("Missing expected file: " + loom .getPath ());
0 commit comments