1515import org .labkey .api .sequenceanalysis .SequenceAnalysisService ;
1616import org .labkey .api .sequenceanalysis .SequenceOutputFile ;
1717import org .labkey .api .sequenceanalysis .pipeline .AbstractParameterizedOutputHandler ;
18- import org .labkey .api .sequenceanalysis .pipeline .BcftoolsRunner ;
1918import org .labkey .api .sequenceanalysis .pipeline .PipelineOutputTracker ;
2019import org .labkey .api .sequenceanalysis .pipeline .ReferenceGenome ;
2120import org .labkey .api .sequenceanalysis .pipeline .SequenceAnalysisJobSupport ;
2524import org .labkey .api .sequenceanalysis .run .AbstractCommandWrapper ;
2625import org .labkey .api .sequenceanalysis .run .DockerWrapper ;
2726import org .labkey .api .util .FileType ;
27+ import org .labkey .api .util .FileUtil ;
2828import org .labkey .api .writer .PrintWriters ;
2929import org .labkey .sequenceanalysis .SequenceAnalysisModule ;
30- import org .labkey .sequenceanalysis .run .util .BgzipRunner ;
3130import org .labkey .sequenceanalysis .util .SequenceUtil ;
3231
3332import java .io .File ;
@@ -172,7 +171,7 @@ else if (genomeIds.isEmpty())
172171 SAMSequenceDictionary dict = SAMSequenceDictionaryExtractor .extractDictionary (rg .getSequenceDictionary ().toPath ());
173172 for (SAMSequenceRecord r : dict .getSequences ())
174173 {
175- File contigVcf = new File (ctx .getOutputDir (), basename + "." + r .getSequenceName () + ".vcf.gz" );
174+ File contigVcf = FileUtil . appendName (ctx .getOutputDir (), basename + "." + r .getSequenceName () + ".vcf.gz" );
176175 File contigVcfIdx = new File (contigVcf .getPath () + ".tbi" );
177176 File doneFile = new File (contigVcf .getPath () + ".done" );
178177 ctx .getFileManager ().addIntermediateFile (contigVcf );
@@ -241,8 +240,9 @@ public void execute(List<File> inputGvcfs, File outputVcf, PipelineOutputTracker
241240 DockerWrapper wrapper = new DockerWrapper ("ghcr.io/dnanexus-rnd/glnexus:" + binVersion , ctx .getLogger (), ctx );
242241 wrapper .setTmpDir (new File (SequencePipelineService .get ().getJavaTempDir ()));
243242 wrapper .setWorkingDir (ctx .getWorkingDirectory ());
243+ wrapper .setMaxRetries (0 );
244244
245- File bed = new File (ctx .getWorkingDirectory (), "contig.bed" );
245+ File bed = FileUtil . appendName (ctx .getWorkingDirectory (), "contig.bed" );
246246 tracker .addIntermediateFile (bed );
247247 try (PrintWriter bedWriter = PrintWriters .getPrintWriter (bed ))
248248 {
@@ -277,12 +277,10 @@ public void execute(List<File> inputGvcfs, File outputVcf, PipelineOutputTracker
277277 dockerArgs .add (f .getPath ());
278278 });
279279
280- File bcftools = BcftoolsRunner .getBcfToolsPath ();
281- File bgzip = BgzipRunner .getExe ();
282- dockerArgs .add (" | " + bcftools .getPath () + " view | " + bgzip .getPath () + " -c > " + outputVcf .getPath ());
280+ dockerArgs .add (" | bcftools view | bgzip -f -c > " + outputVcf .getPath ());
283281
284282 // Command will fail if this exists:
285- File dbDir = new File (ctx .getWorkingDirectory (), "GLnexus.DB" );
283+ File dbDir = FileUtil . appendName (ctx .getWorkingDirectory (), "GLnexus.DB" );
286284 tracker .addIntermediateFile (dbDir );
287285 if (dbDir .exists ())
288286 {
@@ -296,6 +294,10 @@ public void execute(List<File> inputGvcfs, File outputVcf, PipelineOutputTracker
296294 throw new PipelineJobException (e );
297295 }
298296 }
297+ else
298+ {
299+ getLogger ().debug ("GLnexus.DB does not exist: " + dbDir .getPath ());
300+ }
299301
300302 wrapper .executeWithDocker (dockerArgs , ctx .getWorkingDirectory (), tracker , inputGvcfs );
301303
0 commit comments