Refactor internals for speed, fix bugs, bump to 1.8.7#29
Merged
Conversation
Internal refactor with no change to documented behaviour (verified against a golden-master snapshot of every exported function), removing duplicated code and large per-string dplyr overhead. Biggest speedups in drop_read_counts and position_from_variant_string (now pure string operations). Bug fixes: - get_component_variants() no longer errors on valid strings that combine a phased het locus with a homozygous locus (e.g. pfcrt:72_73:C|S_V). - check_position_string() now validates every distinct input, not just the first n_unique original elements (invalid strings after duplicates were being skipped). - check_variant_string()/check_position_string() now carry the failure reason in the error condition (conditionMessage) rather than an empty stop(). Behaviour changes: - drop_read_counts() and position_from_variant_string() preserve the input format rather than re-normalising it (position ranges and concise amino-acid notation are kept; genes are still sorted alphabetically). Other: - Moved test-case CSVs from inst/extdata to tests/testthat/testdata and read them with readr::read_csv (strips the UTF-8 BOM that had silently broken the validator tests); added guards so fixture-load failures are loud. - Removed the unused tidyr dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Internal refactor with no change to documented behaviour (verified against a golden-master snapshot of every exported function), removing duplicated code and large per-string dplyr overhead. Biggest speedups in drop_read_counts and position_from_variant_string (now pure string operations).
Bug fixes:
Behaviour changes:
Other: