Skip to content

Introduce buildcompiler.protocols subpackage with native OT-2 Python and JSON implementations of assembly, transformation, and plating - #119

Merged
Gonza10V merged 5 commits into
mainfrom
protocols
Oct 15, 2026
Merged

Gonza10V merged 5 commits into
mainfrom
protocols

Conversation

@marpaia

@marpaia marpaia commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Inspired by the functionality of PUDU's protocol, but looking to introduce a more robust software architecture, this PR introduces a buildcompiler.protocols subpackage which contains cloning workflows (currently: assembly, transformation, and plating) for the OpenTrons OT-2. The protocols can be rendered using the OpenTrons Python API or the OpenTrons JSON API.

While the code is very different from PUDU (it is very much a derivative work), both of these output protocols are currently evaluated for functional equivalence with their PUDU counterparts and, as such, should behave identically to the current version of the PUDU protocols.

@Gonza10V

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T21:25:15.351349Z fb7a575 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: fb7a5758a7

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

role="dna",
replicate=location_index + 1,
source_sample_id=upstream.id if upstream else None,
initial_volume_ul=config.volume_dna,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Provision each DNA aliquot for all planned transfers

When a plasmid is shared across enough reactions, every output draws transfer_volume_dna from the same sample, but that sample is always loaded with only volume_dna. For example, six reactions sharing one plasmid with the defaults create twelve 2 µL draws from a 20 µL aliquot, so the protocol runs the source dry. Validate cumulative consumption or allocate/load additional aliquots before rendering the protocol.

AGENTS.md reference: AGENTS.md:L48-L53

Useful? React with 👍 / 👎.

SamplePoint(sample_id=output.id) for _, output in group
),
volume_ul=config.transfer_volume_competent_cell,
mix_before=(3, 50),

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 Keep the fixed mix within the configured cell volume

If tube_volume_competent_cell is configured below 50 µL, which current validation permits as long as it covers one transfer, every cell distribution still attempts to mix 50 µL from that tube. For example, a 20 µL tube with a 20 µL transfer compiles successfully but generates an impossible aspiration; reject such configurations or derive the mix volume from the available source volume.

AGENTS.md reference: AGENTS.md:L48-L53

Useful? React with 👍 / 👎.

Comment on lines +419 to +420
volume_ul=config.transfer_volume_recovery_media,
air_gap_ul=10,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject transformations that overflow reaction wells

The recovery transfer is emitted without checking the final volume against the allocated nest_96_wellplate_100ul_pcr_full_skirt wells. A request with many plasmids, or otherwise valid custom cell/DNA/recovery volumes, can make cell + DNA transfers + recovery exceed 100 µL while compilation still succeeds, producing a protocol that overflows the reaction well; validate the aggregate volume before adding this step.

AGENTS.md reference: AGENTS.md:L48-L53

Useful? React with 👍 / 👎.

@Gonza10V
Gonza10V merged commit d3af191 into main Oct 15, 2026
4 checks passed
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.

2 participants