Skip to content

Commit d688553

Browse files
committed
Preferentially use remote cached genome
1 parent 4261783 commit d688553

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/GenotypeGVCFHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ private File runGenotypeGVCFs(PipelineJob job, JobContext ctx, ProcessVariantsHa
383383
toolParams.add("--genomicsdb-shared-posixfs-optimizations");
384384
}
385385

386-
wrapper.execute(genome.getSourceFastaFile(), outputVcf, toolParams, inputVcf);
386+
wrapper.execute(genome.getWorkingFastaFile(), outputVcf, toolParams, inputVcf);
387387

388388
action.addOutput(outputVcf, "VCF", outputVcf.exists(), true);
389389
action.setEndTime(new Date());

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/ReferenceGenomeImpl.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ public boolean isTemporaryGenome() {
5656
@Override
5757
public @NotNull File getWorkingFastaFile()
5858
{
59+
if (SequencePipelineService.get().isRemoteGenomeCacheUsed())
60+
{
61+
File ret = SequencePipelineService.get().getRemoteGenomeCacheDirectory();
62+
if (ret != null)
63+
{
64+
ret = new File(ret, getGenomeId().toString());
65+
ret = new File(ret, _sourceFasta.getName());
66+
if (ret.exists())
67+
{
68+
return ret;
69+
}
70+
}
71+
}
72+
5973
return _workingFasta == null ? _sourceFasta : _workingFasta;
6074
}
6175

blast/src/org/labkey/blast/pipeline/BlastDatabasePipelineJob.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public BlastDatabasePipelineJob(Container c, User user, ActionURL url, PipeRoot
5555
setLogFile(new File(BLASTManager.get().getDatabaseDir(c, true), "blast-" + _databaseGuid + ".log"));
5656

5757
ReferenceGenome rg = SequenceAnalysisService.get().getReferenceGenome(_libraryId, user);
58-
_fasta = rg.getSourceFastaFile();
58+
_fasta = rg.getWorkingFastaFile();
5959
_databaseDir = BLASTManager.get().getDatabaseDir(getContainer(), true);
6060
possiblyCreateDbRecord();
6161
}

0 commit comments

Comments
 (0)