From df316e4650022923eb5c136b41eccc8a673fe7db Mon Sep 17 00:00:00 2001 From: Xiuwen Zheng Date: Tue, 25 Jun 2024 16:39:56 -0500 Subject: [PATCH] update seqAddValue() --- NEWS | 6 ++++++ R/AddValue.R | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 11dd197..8135402 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,12 @@ BUG FIXES o `seqMerge()` should internally use "chr_position_ref_alt" to distinguish the variants in different files + o `seqAddValue(, varnm="annotation/filter")` should work with a factor + variable + + o `seqAddValue(, varnm="variant.id")` can reset the variant IDs with a + different number of the variants + CHANGES IN VERSION 1.44.0 ------------------------- diff --git a/R/AddValue.R b/R/AddValue.R index 13cc6e1..d0a96b6 100644 --- a/R/AddValue.R +++ b/R/AddValue.R @@ -51,8 +51,8 @@ stopifnot(is.vector(val), is.character(val) | is.numeric(val)) if (anyDuplicated(val)) stop("'val' should be unique.") - if (nvar>0L && length(val)!=nvar) - stop("length(val) should be ", nvar, ", but received ", length(val)) + # if (nvar>0L && length(val)!=nvar) + # stop("length(val) should be ", nvar, ", but received ", length(val)) if (length(desp)) warning("'desp' is not used.") n <- add.gdsn(gdsfile, "variant.id", val, compress=compress, closezip=TRUE,