Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create any GoldenGate assemblies #13

Closed
GabrielleJohnston opened this issue Jul 14, 2020 · 2 comments
Closed

Failed to create any GoldenGate assemblies #13

GabrielleJohnston opened this issue Jul 14, 2020 · 2 comments

Comments

@GabrielleJohnston
Copy link

GabrielleJohnston commented Jul 14, 2020

I have used the example goldengate_plasmid.py without any modifications and have received the following error:

    154             filename = self._filename() + ".fasta"
    155 
--> 156         self._check_output()
    157         return SeqIO.write(self.output, filename, "fasta")
    158 

...\synbio\protocol.py in _check_output(self)
    346         """
    347         if not self.containers:
--> 348             self.run()
    349 
    350             if not self.output:

...\synbio\protocols\goldengate.py in run(self)
     75         # get all the unique contents and set them up in their own wells
     76         mixed_wells = self._create_mixed_wells()
---> 77 
     78         for step in [
     79             Setup(

...\synbio\protocols\goldengate.py in _create_mixed_wells(self)
    125         if not mixed_wells:
    126             raise RuntimeError(f"Failed to create any GoldenGate assemblies")
--> 127 
    128         return sorted(mixed_wells)

RuntimeError: Failed to create any GoldenGate assemblies

Gibson assembly examples work perfectly for me, but none of the GoldenGate examples do.

Thank you!

Edit: The examples work if linear = False is specified in the design.

@jjti
Copy link
Collaborator

jjti commented Jul 17, 2020

Hey I tried this and could replicate. I thought it might be a dependency issue (where a bumped dependency broke the package) but I can't resolve the issue even when pinning the depends.

When you ran with a linear = False in design, how long did it take for it to assemble? it was taking >2 minutes on my laptop so I just stopped it

@GabrielleJohnston
Copy link
Author

Thank you for your quick response!

I believe it is because the genbank files are for circular DNA, but unless it is specified it is interpreted as linear. On my laptop it runs in less than 5 seconds.

In examples/goldengate_plasmid.py I replaced the design with this:

    (read(r)
    for r in [
        "J23100_AB.gb",
        "B0032m_BC.gb",
        "C0012m_CD.gb",
        "B0015_DE.gb",
        "DVK_AE.gb",
    ]), 
    linear = False
)

For examples/goldengate_combinatorial.py I did find that assembly took too long to run, but I suspect that it is because the data directory is so long and multiple plasmids are read in. If the file read in method from tests/goldengate_test.py is used, assembly is also very fast.

I've copied and pasted my entire goldengate_combinatorial.py below as there are several changes:

"""Example of a Combinatorial Golden Gate assembly with steps and output."""

import os

from Bio.SeqIO import parse

from synbio.designs import Combinatorial
from synbio.protocols import GoldenGate

DIR_NAME = os.path.abspath(os.path.dirname(__file__))
DATA_DIR = os.path.join(DIR_NAME, "..", "..", "data", "goldengate")

def read(filename):
    """Read in a single Genbank file from the test directory."""

    return next(parse(os.path.join(DATA_DIR, filename), "genbank"))

records = []
for (_, _, filenames) in os.walk(DATA_DIR):
    for file in filenames:
        gb = os.path.join(DATA_DIR, file)
        if not gb.endswith(".gb"):
            continue
        for record in parse(gb, "genbank"):
            records.append(record)

record_sets = []
for f_type in ["promoter", "RBS", "CDS", "terminator"]:

    def test(r):
        return any(
            f.type == f_type and f.location.start < 50 for f in r.features
        )

    new_bin = [r for r in records if test(r)][:5]
    record_sets.append(new_bin)  # add a new bin

records = [r for record_set in record_sets for r in record_set] + [
    read("DVK_AE.gb")
]

# create a combinatorial library design from multiple "bins"
design = Combinatorial(records, linear = False)

# create a protocol using Golden Gate as the sole composite step and run
protocol = GoldenGate(
    name="Combinatorial Golden Gate", design=design, include=["KanR"], min_count=5
)

# export all the output plasmids to a multi-FASTA
protocol.to_fasta("composite_parts.fasta")

# export plate layouts
protocol.to_csv("plate_layouts.csv")

# export human protocol
protocol.to_txt("protocol.txt")

# export a hamilton picklist
protocol.to_picklists("robotic_picklist.gwl", platform="tecan")

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

No branches or pull requests

2 participants