Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: variantstring
Type: Package
Title: Functions for working with variant string format
Version: 1.8.6
Version: 1.8.7
Authors@R: c(
person("Bob", "Verity", email = "r.verity@imperial.ac.uk", role = c("aut", "cre"))
)
Expand All @@ -12,10 +12,10 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.2
Suggests:
Suggests:
readr,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Imports:
Imports:
dplyr,
stringr,
tidyr
stringr
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ import(dplyr)
importFrom(stats,na.omit)
importFrom(stringr,str_c)
importFrom(stringr,str_split)
importFrom(tidyr,pivot_longer)
30 changes: 30 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# variantstring 1.8.7

## Bug fixes

* `get_component_variants()` no longer errors on valid strings that combine a
phased heterozygous locus with a homozygous locus (e.g. `pfcrt:72_73:C|S_V`).
The homozygous allele is now correctly carried across all phased components.
* `check_position_string()` now validates every distinct input. Previously, when
the input contained duplicates, an invalid string positioned after the
duplicates could be skipped and wrongly pass validation.
* `check_variant_string()` and `check_position_string()` now report the reason
for failure in the error condition itself (via `conditionMessage()`), instead
of printing it to the console and raising an empty error. This makes the
reason available to calling code that catches the error.

## Behaviour changes

* `drop_read_counts()` and `position_from_variant_string()` now preserve the
format of the input rather than re-normalising it. In particular, position
ranges (e.g. `72-74`) are kept compact rather than expanded to `72_73_74`, and
the concise amino-acid notation (e.g. `CV`) is preserved rather than rewritten
as `C_V`. Genes are still returned in alphabetical order.

## Internal

* Substantial refactor of the internals for speed and to remove duplicated code,
with no change to the documented behaviour of the affected functions. The
largest gains are in `drop_read_counts()` and `position_from_variant_string()`
(now pure string operations), with smaller gains across most other functions.
* Removed the unused `tidyr` dependency.
Loading
Loading