From 09f54401200daf90254837b35484cec6a1f4ded7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 23 Jan 2024 10:42:53 +0100 Subject: [PATCH 1/3] bump to dev version --- svync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svync.go b/svync.go index b360c81..497dd86 100644 --- a/svync.go +++ b/svync.go @@ -13,7 +13,7 @@ func main() { Name: "svync", Usage: "A tool to standardize VCF files from structural variant callers", HideHelpCommand: true, - Version: "0.1.1", + Version: "0.2.0dev", Flags: []cli.Flag{ &cli.BoolFlag{ Name: "nodate", From 3e0ea1b872b80136039b8fab230d24ae74977ae4 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 23 Jan 2024 14:02:44 +0100 Subject: [PATCH 2/3] output header for empty VCFs --- data/test1.delly.empty.vcf | 46 ++++++++++++++++++++++++++++++++++++++ svync_api/execute.go | 5 +++++ 2 files changed, 51 insertions(+) create mode 100644 data/test1.delly.empty.vcf diff --git a/data/test1.delly.empty.vcf b/data/test1.delly.empty.vcf new file mode 100644 index 0000000..1f86684 --- /dev/null +++ b/data/test1.delly.empty.vcf @@ -0,0 +1,46 @@ +##fileformat=VCFv4.2 +##FILTER= +##fileDate=20231204 +##ALT= +##ALT= +##ALT= +##ALT= +##ALT= +##FILTER= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##reference=reference.fasta +##contig= +##contig= +##contig= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT PosCon1 \ No newline at end of file diff --git a/svync_api/execute.go b/svync_api/execute.go index fc28462..fbbd396 100644 --- a/svync_api/execute.go +++ b/svync_api/execute.go @@ -91,6 +91,11 @@ func Execute(Cctx *cli.Context, config *Config) { } } + if !headerIsMade { + writeHeader(config, Cctx, header, outputFile, stdout) + headerIsMade = true + } + } // readBgzipLine reads a line from a bgzip file From 3c28d03ad60c63c9351089d06fe77c256aa5c4fd Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 23 Jan 2024 15:32:15 +0100 Subject: [PATCH 3/3] bump to 0.1.2 --- CHANGELOG.md | 5 +++++ svync.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a19aca4..6062409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.1.2 - Adjust +## Fixes +- Fixed a bug where the output VCF has no header when the input VCF has no variants + + # 0.1.1 - Transform ## Fixes - Fixed a bug where the samples were missing from the header diff --git a/svync.go b/svync.go index 497dd86..b986b70 100644 --- a/svync.go +++ b/svync.go @@ -13,7 +13,7 @@ func main() { Name: "svync", Usage: "A tool to standardize VCF files from structural variant callers", HideHelpCommand: true, - Version: "0.2.0dev", + Version: "0.1.2", Flags: []cli.Flag{ &cli.BoolFlag{ Name: "nodate",