Skip to content

Commit 64ceef2

Browse files
authored
Bugfix to mGAP track generator (#131)
* Bugfix to mGAP track task
1 parent e803df7 commit 64ceef2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

mGAP/src/org/labkey/mgap/pipeline/GenerateMgapTracksStep.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ public void performAdditionalMergeTasks(SequenceOutputHandler.JobContext ctx, Pi
469469
}
470470

471471
job.getLogger().info("Merging novel sites VCF");
472-
List<File> toConcat = orderedScatterOutputs.stream().map(f -> {
473-
f = getNovelSitesOutput(f.getParentFile());
472+
List<File> toConcat = orderedJobDirs.stream().map(dirName -> {
473+
File f = getNovelSitesOutput(new File(ctx.getSourceDirectory(), dirName));
474474
if (!f.exists())
475475
{
476476
throw new IllegalStateException("Missing file: " + f.getPath());
@@ -482,6 +482,11 @@ public void performAdditionalMergeTasks(SequenceOutputHandler.JobContext ctx, Pi
482482
return f;
483483
}).toList();
484484

485+
if (toConcat.isEmpty())
486+
{
487+
throw new PipelineJobException("No novel sites VCFs found");
488+
}
489+
485490
String basename = SequenceAnalysisService.get().getUnzippedBaseName(toConcat.get(0).getName());
486491
File combined = new File(ctx.getSourceDirectory(), basename + ".vcf.gz");
487492
File combinedIdx = new File(combined.getPath() + ".tbi");

0 commit comments

Comments
 (0)