From 03a14f5eb3582d520aab0725490a9ce545a5c7b0 Mon Sep 17 00:00:00 2001 From: jrobinso <933148+jrobinso@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:02:30 -0800 Subject: [PATCH] trim VCF lines before tokenizing - fixes #1922 --- js/variant/vcfParser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/variant/vcfParser.js b/js/variant/vcfParser.js index 3ea669ec9..d1ef523c7 100644 --- a/js/variant/vcfParser.js +++ b/js/variant/vcfParser.js @@ -140,7 +140,7 @@ class VcfParser { while ((line = await dataWrapper.nextLine()) !== undefined) { if (line && !line.startsWith("#")) { - const tokens = line.split("\t") + const tokens = line.trim().split("\t") if (tokens.length === nExpectedColumns) { const variant = new Variant(tokens) variant.header = this.header // Keep a pointer to the header to interpret fields for popup text