Conversation
Parses the xgroup block of a TNT file into a named integer vector mapping each character (1-indexed) to its partition; returns NULL when no xread block is present, all-NA when xread is present but xgroup is not. Joins the ReadCharacters family via @describeIn. Sourced from a prototype in AutoPart, where the function originally lived; moved upstream so AutoPart and other downstream packages can share a single implementation. Closes that duplication. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
- Coverage 96.06% 96.02% -0.04%
==========================================
Files 80 80
Lines 5890 5938 +48
==========================================
+ Hits 5658 5702 +44
- Misses 232 236 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Performance benchmark results
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Performance benchmark results
|
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.
Summary
ReadXgroup(filepath, encoding = "UTF8")parses thexgroupcharacter-partition block of a TNT file, returning a named integer vector mapping each character (1-indexed) to its partition.NULLwhen noxreadblock is present; returnsrep(NA_integer_, nChar)whenxreadis present butxgroupis not.ReadCharactersdoc family via@describeIn; exports.UTFLines-style encoding handling for consistency withReadTntCharacters.AutoPart; moved upstream so AutoPart and other downstream packages share a single implementation.Bumps version to
2.3.0.9001and adds a NEWS entry.Test plan
inst/extdata/tests/tnt-xgroup.tnt(6 chars, 4 taxa, twoxgrouplines)tests/testthat/test-ReadTntTree.Rcovering: well-formedxgroupparsing,NULLon missingxread, all-NAwhenxgroupabsent, range-expansion helper.ExpandTntRange(A.B, A., A.A forms)devtools::load_all()+testthat::test_file('tests/testthat/test-ReadTntTree.R')— 42 dots, no failures🤖 Generated with Claude Code