Improve GlycoCT parser coverage - #24
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull request overview
This PR expands parse_glycoct() to handle additional real-world GlycoCT encodings found in the sequence corpus, improving successful parsing and adding regression coverage for the new cases.
Changes:
- Added preprocessing to accept space-separated / single-line GlycoCT records (e.g., CSV-export style).
- Added mapping for representable generic GlycoCT descriptors (generic
HEX, N-acetylatedHEX, deoxy-HEX, and generic Neu5Ac/Neu5Gc backbones). - Added mapping of direct GlycoCT
n-sulfatesubstituents to N-sulfated amino sugars, plus focused tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/testthat/test-parse-glycoct.R | Adds targeted regression tests for space-separated records and newly supported generic/N-sulfate mappings. |
| R/parse-glycoct.R | Implements line splitting for single-line records and adds generic composite matching + helper predicates/mappers. |
| NEWS.md | Documents the newly supported GlycoCT parsing/mapping behaviors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d85665b007
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Improve
parse_glycoct()coverage for GlycoCT records from the sequence corpus.Details
RES, residues,LIN, and linkages are stored on one line.glyreprmonosaccharides, including genericHEX, N-acetylatedHEX, deoxy-HEX, and generic Neu5Ac/Neu5Gc descriptors.n-sulfatesubstituents to N-sulfated amino sugars.NEWS.mdwith the live(#24)suffix for the GlycoCT entries.Verification
git rebase mainRscript -e 'devtools::document()'Rscript -e 'devtools::load_all(quiet = TRUE); devtools::test(filter = "parse-glycoct")'-> 306 passedRscript -e 'devtools::test()'-> 943 passedair format R/parse-glycoct.R tests/testthat/test-parse-glycoct.Rgit diff --check main..HEAD