Skip to content

Add GlycoWorkbench sequence parser - #48

Merged
fubin1999 merged 4 commits into
mainfrom
gwb
Aug 14, 2026
Merged

Add GlycoWorkbench sequence parser#48
fubin1999 merged 4 commits into
mainfrom
gwb

Conversation

@fubin1999

Copy link
Copy Markdown
Member

Summary

  • Add exported parse_gwb() support for GWB/GWS sequences, including branches, substituents, furanose and configured residues, reducing-end alditols, legacy ulosonic markers, and uncertain antennae.
  • Route freeEnd and redEnd inputs through auto_parse() and update package documentation, pkgdown, and NEWS.
  • Validate all 50,780 corpus GWB sequences against normalized IUPAC or parsed WURCS references; all IUPAC-matched inputs parse except 18 glyrepr mixed generic/concrete restrictions, and every WURCS-only GWB input parses.

Verification

  • Rscript -e 'devtools::test()' — 1,655 tests passed.
  • Rscript -e 'pkgdown::check_pkgdown()' — no problems.
  • Rscript -e 'devtools::check(error_on = "warning", args = c("--no-manual"))' — 0 errors, 0 warnings, one environment-only clock NOTE.

Add parse_gwb() with branch, substituent, reducing-end, and uncertain-antenna support. Integrate automatic format detection and add corpus-derived regression coverage and documentation.
@fubin1999
fubin1999 marked this pull request as ready for review August 14, 2026 10:45
@fubin1999

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8b828ed3b

ℹ️ 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".

Comment thread R/parse-gwb.R
Preserve the GWB ring marker and reject explicit open-chain residues unless they are representable as a reduced redEnd root. Add regressions for free-end and linked open-chain inputs.
@fubin1999

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a23a411ade

ℹ️ 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".

Comment thread R/parse-gwb.R Outdated
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Emit explicit candidate parents whenever occupied acceptor positions remove nodes from a GlycoWorkbench uncertain-antenna domain. Cover lone floating monosaccharide and substituent cases.
@fubin1999

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 2f5f9fcb0a

ℹ️ 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".

@fubin1999
fubin1999 merged commit 8647bfa into main Aug 14, 2026
13 checks passed
@fubin1999
fubin1999 deleted the gwb branch August 14, 2026 11:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f5f9fcb0a

ℹ️ 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".

Comment thread R/parse-gwb.R
Comment on lines +617 to +620
feasible <- purrr::map_lgl(main_nodes, function(main_node) {
occupied <- gwb_node_occupied_positions(main_node)
any(!positions %in% occupied)
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove occupied alternatives from floating linkages

When a GWB uncertain antenna has alternative positions, retaining a parent because any position is free leaves the occupied alternatives in the serialized linkage. For example, freeEnd--1b1D-Glc,p--3Ac}--3/6S$... has only one candidate parent whose position 3 is occupied, but this code keeps it and emits {3/6S}, so the parsed domain incorrectly still permits sulfate at position 3. Compute the feasible positions per retained parent and narrow the linkage when the resulting sets agree; reject parent-position combinations that cannot be represented without introducing impossible alternatives.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant