Skip to content

Commit 4494130

Browse files
committed
Bugfix to UpdateVCFSequenceDictionary
1 parent 9bc6d4d commit 4494130

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

singlecell/src/org/labkey/singlecell/pipeline/singlecell/VireoHandler.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,20 @@ public void execute(File vcf, File dict) throws PipelineJobException
376376
throw new PipelineJobException("Unable to find file: " + output.getPath());
377377
}
378378

379-
vcf.delete();
380-
381379
try
382380
{
383-
SequenceAnalysisService.get().ensureVcfIndex(vcf, getLogger(), true);
381+
// replace original:
382+
vcf.delete();
383+
FileUtils.moveFile(output, vcf);
384+
385+
File outputIdx = new File(output.getPath() + ".tbi");
386+
File vcfIdx = new File(vcf.getPath() + ".tbi");
387+
if (vcfIdx.exists())
388+
{
389+
vcfIdx.delete();
390+
}
391+
392+
FileUtils.moveFile(outputIdx, vcfIdx);
384393
}
385394
catch (IOException e)
386395
{

0 commit comments

Comments
 (0)