File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
singlecell/src/org/labkey/singlecell/run Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -256,19 +256,19 @@ private File makeDummyIndex(JobContext ctx) throws PipelineJobException
256256 try
257257 {
258258 File indexDir = new File (ctx .getOutputDir (), "cellrangerIndex" );
259- if (! indexDir .exists ())
259+ if (indexDir .exists ())
260260 {
261- indexDir . mkdirs ( );
261+ FileUtils . deleteDirectory ( indexDir );
262262 }
263263
264- File fasta = new File (indexDir , "genome.fasta" );
264+ File fasta = new File (ctx . getOutputDir () , "genome.fasta" );
265265 try (PrintWriter writer = PrintWriters .getPrintWriter (fasta ))
266266 {
267267 writer .println (">1" );
268268 writer .println ("ATGATGATGATGATG" );
269269 }
270270
271- File gtf = new File (indexDir , "genome.gtf" );
271+ File gtf = new File (ctx . getOutputDir () , "genome.gtf" );
272272 try (PrintWriter writer = PrintWriters .getPrintWriter (gtf ))
273273 {
274274 writer .println ("1\t nowhere\t exon\t 1\t 4\t .\t +\t .\t transcript_id \" transcript1\" ; gene_id \" gene1\" ; gene_name \" gene1\" ;" );
@@ -294,9 +294,13 @@ private File makeDummyIndex(JobContext ctx) throws PipelineJobException
294294 args .add ("--memgb=" + maxRam .toString ());
295295 }
296296
297- wrapper .setWorkingDir (indexDir );
297+ wrapper .setWorkingDir (ctx . getOutputDir () );
298298 wrapper .execute (args );
299299
300+ ctx .getFileManager ().addIntermediateFile (fasta );
301+ ctx .getFileManager ().addIntermediateFile (gtf );
302+ ctx .getFileManager ().addIntermediateFile (indexDir );
303+
300304 return indexDir ;
301305 }
302306 catch (IOException e )
You can’t perform that action at this time.
0 commit comments