Skip to content

Commit 2c5ee66

Browse files
committed
Adjust location of VCF index tasks to better allow resume
1 parent cb4ed81 commit 2c5ee66

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

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

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,6 @@ public static List<Interval> getIntervals(JobContext ctx)
369369

370370
public static File processVCF(File input, Integer libraryId, JobContext ctx, Resumer resumer, boolean subsetToIntervals) throws PipelineJobException
371371
{
372-
try
373-
{
374-
SequenceAnalysisService.get().ensureVcfIndex(input, ctx.getLogger());
375-
}
376-
catch (IOException e)
377-
{
378-
throw new PipelineJobException(e);
379-
}
380-
381372
File currentVCF = input;
382373

383374
ctx.getJob().getLogger().info("***Starting processing of file: " + input.getName());
@@ -409,6 +400,15 @@ public static File processVCF(File input, Integer libraryId, JobContext ctx, Res
409400
}
410401
else
411402
{
403+
try
404+
{
405+
SequenceAnalysisService.get().ensureVcfIndex(input, ctx.getLogger());
406+
}
407+
catch (IOException e)
408+
{
409+
throw new PipelineJobException(e);
410+
}
411+
412412
OutputVariantsStartingInIntervalsStep.Wrapper wrapper = new OutputVariantsStartingInIntervalsStep.Wrapper(ctx.getLogger());
413413
wrapper.execute(input, outputFile, getIntervals(ctx));
414414
}
@@ -432,6 +432,15 @@ public static File processVCF(File input, Integer libraryId, JobContext ctx, Res
432432
continue;
433433
}
434434

435+
try
436+
{
437+
SequenceAnalysisService.get().ensureVcfIndex(input, ctx.getLogger());
438+
}
439+
catch (IOException e)
440+
{
441+
throw new PipelineJobException(e);
442+
}
443+
435444
RecordedAction action = new RecordedAction(stepCtx.getProvider().getLabel());
436445
Date start = new Date();
437446
action.setStartTime(start);

0 commit comments

Comments
 (0)