broadinstitute / viral-assemble

viral-ngs: genome assembly and scaffolding
Other
8 stars 2 forks source link

fix refine_assembly outVcf when no aligned reads #26

Closed dpark01 closed 3 years ago

dpark01 commented 3 years ago

Previously, calling refine_assembly on a bam with no aligned reads caused us to write an empty output file manually because GATK would fail in such scenarios. But we forgot to emit an "empty" VCF file as well (causing downstream bcftools invocations in the WDL to fail). And an "empty" VCF file is not actually empty (it has a header). This PR ensures the VCF is written properly in the empty data scenario, and adds to the unit test to cover this.