diff --git a/DESCRIPTION b/DESCRIPTION index 9bdc489..7967a72 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Type: Package Title: Annotation of Genetic Variants Description: Annotate variants, compute amino acid coding changes, predict coding outcomes. -Version: 1.59.0 +Version: 1.59.1 Authors@R: c( person("Valerie", "Oberchain", role="aut"), person("Martin", "Morgan", role="aut"), diff --git a/NEWS b/NEWS index 6fcc401..ce2e22f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,18 @@ +CHANGES IN VERSION 1.59.1 +------------------------- + +BUG FIXES + + o readVcf() now preserves '*' (spanning deletion) alleles instead of + converting them to empty strings. VCFs containing '*' alleles are + returned with a CharacterList ALT column (same as structural variant + VCFs), allowing faithful round-trip through writeVcf(). Previously, + '*' was erased at read time making it impossible to write valid VCF + output for files containing spanning deletions — IGV/htsjdk would + reject the output with "empty alleles are not permitted". VCFs + without '*' alleles continue to use DNAStringSetList as before. + (GitHub issue #65) + CHANGES IN VERSION 1.36.0 ------------------------- diff --git a/R/AllUtilities.R b/R/AllUtilities.R index e0478c2..bd7485b 100644 --- a/R/AllUtilities.R +++ b/R/AllUtilities.R @@ -110,7 +110,6 @@ CharacterList(x) } else { flat[grepl("I", flat, fixed=TRUE)] <- "." - flat[grepl("*", flat, fixed=TRUE)] <- "" relist(DNAStringSet(flat), x) } } @@ -118,12 +117,15 @@ ## The grep for '.' here is looking for '.' as *part* of the ALT field. ## If the ALT were '.' only, with no other characters, it would have been ## converted to an empty string in the C code before it reached this point. +## '*' is the VCF spanning deletion allele — not valid DNA, treated as +## structural so it's preserved in a CharacterList (GitHub issue #65). .isStructural <- function(x) { grepl("<", x, fixed=TRUE) | grepl("[", x, fixed=TRUE) | grepl("]", x, fixed=TRUE) | - grepl(".", x, fixed=TRUE) + grepl(".", x, fixed=TRUE) | + grepl("*", x, fixed=TRUE) } .formatInfo <- function(x, hdr, nrecords)