Skip to content

Commit ffdfc6f

Browse files
committed
Also copy VCF index to local cache dir if using a VCF
1 parent a7b31b6 commit ffdfc6f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/ScatterGatherUtils.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ public static void possiblyCacheSupportFiles(SequenceOutputHandler.JobContext ct
5454
try
5555
{
5656
FileUtils.copyFile(inputFile, localCopy);
57+
if (inputFile.getPath().toLowerCase().endsWith("vcf.gz"))
58+
{
59+
File inputFileIdx = new File(inputFile.getPath() + ".tbi");
60+
File localCopyIdx = new File(ScatterGatherUtils.getLocalCopyDir(ctx, true), inputFile.getName() + ".tbi");
61+
if (!inputFileIdx.exists())
62+
{
63+
throw new PipelineJobException("Unable to find file: " + inputFileIdx.getPath());
64+
}
65+
66+
FileUtils.copyFile(inputFileIdx, localCopyIdx);
67+
}
5768
FileUtils.touch(doneFile);
5869
}
5970
catch (IOException e)

0 commit comments

Comments
 (0)