Skip to content

Port Bio.Restriction to BioSmalltalk#11

Closed
hernanmd wants to merge 4 commits intomasterfrom
bio-restriction-port-195259426181153767
Closed

Port Bio.Restriction to BioSmalltalk#11
hernanmd wants to merge 4 commits intomasterfrom
bio-restriction-port-195259426181153767

Conversation

@hernanmd
Copy link
Copy Markdown
Owner

@hernanmd hernanmd commented Apr 3, 2026

This PR ports the restriction enzyme logic from Biopython to BioSmalltalk, re-engineered for Smalltalk-native idioms. It addresses long-standing issues in the original Python implementation by using 1-based indexing, a decorator pattern for circularity, and a flyweight pattern for efficient enzyme management. It also implements a robust many-to-many relationship between enzymes and reactions using an association class for catalytic attributes like Km. Comprehensive tests and a REBASE data parser are included.


PR created automatically by Jules for task 195259426181153767 started by @hernanmd

- Implement BioProtein as a subclass of BioSequence.
- Implement BioEnzyme and BioRestrictionEnzyme classes.
- Implement BioReaction and BioCatalysis for many-to-many relationships.
- Implement BioCircularSequence decorator for virtual circularity.
- Add digestWith: extensions to BioSequence.
- Add BioREBASEParser for emboss_e.dat format.
- Add BioRestrictionTest with comprehensive test cases.
- Use 1-based indexing for all site and fragment calculations.
- Leverage IUPAC mapping for site searching.

Co-authored-by: hernanmd <4825959+hernanmd@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 3 commits April 3, 2026 01:40
Implemented restriction enzyme module including:
- BioProtein, BioEnzyme, BioRestrictionEnzyme (Flyweight).
- Many-to-many ER relationship model (BioReaction, BioCatalysis).
- BioCircularSequence decorator for wrap-around handling.
- BioREBASEParser for emboss_e.dat.
- BioRestrictionTest suite.
- 1-based indexing consistency.

Co-authored-by: hernanmd <4825959+hernanmd@users.noreply.github.com>
Implemented restriction enzyme module including:
- BioProtein, BioEnzyme, BioRestrictionEnzyme (Flyweight).
- Many-to-many ER relationship model (BioReaction, BioCatalysis) with inverse links.
- BioCircularSequence decorator for wrap-around handling.
- BioREBASEParser for emboss_e.dat.
- BioRestrictionTest suite.
- 1-based indexing consistency.

Co-authored-by: hernanmd <4825959+hernanmd@users.noreply.github.com>
- Implement core hierarchy: BioProtein > BioEnzyme > BioRestrictionEnzyme.
- Implement ER relationship model: BioReaction & BioCatalysis (association class).
- Implement Flyweight pattern for efficient enzyme management via registry.
- Implement Decorator pattern for circular sequences (BioCircularSequence).
- Add support for multi-enzyme digestion and IUPAC-aware site searching.
- Implement BioREBASEParser for emboss_e.dat format.
- Implement BioRestrictionMapFormatter for human-readable reports.
- Add comprehensive SUnit tests (BioRestrictionTest) covering linear/circular DNA, multi-enzyme digests, and relationship consistency.
- Fix CI dependency conflict by updating .smalltalk.ston.
- Use Smalltalk-native 1-based indexing for all biological coordinates.

Co-authored-by: hernanmd <4825959+hernanmd@users.noreply.github.com>
@hernanmd hernanmd closed this Apr 3, 2026
@hernanmd hernanmd deleted the bio-restriction-port-195259426181153767 branch April 3, 2026 02:30
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