Skip to content

Level 1 Assembly#37

Open
doublergreer wants to merge 37 commits intomainfrom
index_plasmids
Open

Level 1 Assembly#37
doublergreer wants to merge 37 commits intomainfrom
index_plasmids

Conversation

@doublergreer
Copy link
Collaborator

@doublergreer doublergreer commented Mar 12, 2026

Remaining TODO:

Optional TODO:

  • rewrite old assembly tests so new representation works with CI/CD pipeline
  • cut redundant functions from abstract_translator.py and make a dedicated utility function file

closes #33
closes #28
closes #35 #36

@doublergreer doublergreer requested a review from Gonza10V March 12, 2026 20:59
@doublergreer
Copy link
Collaborator Author

closes #35

@doublergreer
Copy link
Collaborator Author

closes #36

@doublergreer doublergreer marked this pull request as ready for review March 17, 2026 06:34
@Gonza10V
Copy link
Contributor

@codex review

Copy link

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

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: a9e3aac792

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

"""
backbone_def = extract_toplevel_definition(backbone_doc)
backbone_plasmid = MocloPlasmid(backbone_def.displayId, backbone_def, backbone_doc)
backbone_plasmid = Plasmid(backbone_def.displayId, backbone_def, backbone_doc)

Choose a reason for hiding this comment

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

P1 Badge Pass ComponentDefinition to Plasmid constructor

translate_abstract_to_plasmids now instantiates Plasmid with backbone_def.displayId (a string) as the first argument, but Plasmid.__init__ expects a ComponentDefinition and immediately accesses definition.displayId; this raises AttributeError on every call, so abstract translation cannot run at all. The same constructor mismatch also appears in construct_plasmid_dict.

Useful? React with 👍 / 👎.

plasmid_dict, antibiotic_resistance=KAN
)
else:
compatible_plasmids = get_compatible_plasmids(plasmid_dict, self.backbone)

Choose a reason for hiding this comment

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

P2 Badge Use provided backbone argument in assembly_lvl1

When a caller provides the optional backbone parameter, this branch still calls get_compatible_plasmids(..., self.backbone), but self.backbone is never defined in BuildCompiler; this path raises AttributeError and makes user-selected backbones unusable.

Useful? React with 👍 / 👎.

Comment on lines +238 to +240
if all(
s.identity != strain.identity
for s in existing.strain_definitions

Choose a reason for hiding this comment

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

P2 Badge Skip null strain entries before identity comparison

This comprehension dereferences s.identity for every stored strain, but earlier indexing paths create Plasmid(..., strain_definition=None, ...), so existing.strain_definitions can contain None; in collections that include both plasmid implementations and strain module definitions, this throws AttributeError while indexing.

Useful? React with 👍 / 👎.

] # TODO update with more sophisticated selection process?
plasmid_cd = plasmid.plasmid_definition

transformation_activity = sbol2.Activity(f"transform_{chassis_md.name}")

Choose a reason for hiding this comment

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

P2 Badge Make transformation activity IDs unique per plasmid

The activity URI is derived only from chassis_md.name, so every loop iteration creates the same Activity identity for different plasmids; adding the second transformed plasmid to transformation_doc will hit URI collisions and abort instead of producing one transformation record per plasmid.

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.

add sequence constraints to ligation develop index_plasmids functions refine build representation

2 participants