Giter VIP home page Giter VIP logo

Comments (2)

jjti avatar jjti commented on June 21, 2024

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

from synbio.

GabrielleJohnston avatar GabrielleJohnston commented on June 21, 2024

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")

from synbio.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.