@@ -151,7 +151,7 @@ public final AlignmentOutput performAlignment(Readset rs, List<File> inputFastqs
151151 File inputFastq2 = assertSingleFile (inputFastqs2 );
152152
153153 AlignmentOutputImpl output = new AlignmentOutputImpl ();
154- AlignerIndexUtil .copyIndexIfExists (this .getPipelineCtx (), output , "bwa" , referenceGenome );
154+ AlignerIndexUtil .copyIndexIfExists (this .getPipelineCtx (), output , getIndexCachedDirName ( getPipelineCtx (). getJob ()) , referenceGenome );
155155
156156 doPerformAlignment (output , inputFastq1 , inputFastq2 , outputDirectory , referenceGenome , basename , rs , readGroupId , platformUnit );
157157 output .addCommandsExecuted (getWrapper ().getCommandsExecuted ());
@@ -197,7 +197,7 @@ private File runBWAAln(PipelineJob job, ReferenceGenome referenceGenome, File in
197197 args .add ("aln" );
198198 appendThreads (job , args );
199199 args .addAll (bwaAlnArgs );
200- args .add (new File (referenceGenome .getAlignerIndexDir ("bwa" ), FileUtil .getBaseName (referenceGenome .getWorkingFastaFile ().getName ()) + ".bwa.index" ).getPath ());
200+ args .add (new File (referenceGenome .getAlignerIndexDir (getIndexDirName () ), FileUtil .getBaseName (referenceGenome .getWorkingFastaFile ().getName ()) + ".bwa.index" ).getPath ());
201201 args .add (inputFile .getPath ());
202202
203203 File output = new File (getOutputDir (inputFile ), inputFile .getName () + ".sai" );
@@ -230,12 +230,12 @@ protected void performBwaAlignment(PipelineJob job, AlignmentOutputImpl output,
230230 throw new PipelineJobException ("Reference FASTA does not exist: " + referenceGenome .getWorkingFastaFile ().getPath ());
231231 }
232232
233- File expectedIndex = new File (referenceGenome .getAlignerIndexDir ("bwa" ), FileUtil .getBaseName (referenceGenome .getWorkingFastaFile ()) + ".bwa.index.sa" );
233+ File expectedIndex = new File (referenceGenome .getAlignerIndexDir (getIndexDirName () ), FileUtil .getBaseName (referenceGenome .getWorkingFastaFile ()) + ".bwa.index.sa" );
234234 if (!expectedIndex .exists ())
235235 {
236236 throw new PipelineJobException ("Expected index does not exist: " + expectedIndex );
237237 }
238- args .add (new File (referenceGenome .getAlignerIndexDir ("bwa" ), FileUtil .getBaseName (referenceGenome .getWorkingFastaFile ().getName ()) + ".bwa.index" ).getPath ());
238+ args .add (new File (referenceGenome .getAlignerIndexDir (getIndexDirName () ), FileUtil .getBaseName (referenceGenome .getWorkingFastaFile ().getName ()) + ".bwa.index" ).getPath ());
239239
240240 //add SAI
241241 args .add (sai1 .getPath ());
@@ -283,4 +283,9 @@ public File getExe()
283283 {
284284 return SequencePipelineService .get ().getExeForPackage ("BWAPATH" , "bwa" );
285285 }
286+
287+ protected String getIndexDirName ()
288+ {
289+ return ("bwa" );
290+ }
286291}
0 commit comments