Edinburgh-Genome-Foundry / DnaCauldron

:alembic: Simple cloning simulator (Golden Gate etc.) for single and combinatorial assemblies
https://edinburgh-genome-foundry.github.io/DnaCauldron/
MIT License
49 stars 11 forks source link

Assembling fragments digested by different enzymes #15

Open AubinF opened 2 years ago

AubinF commented 2 years ago

Hi, thank you for the great package and documentation. I would like to simulate a Type2s-like assembly where the acceptor and the inserts are digested by different enzymes. In other words, the acceptor is digested with enzyme A, and the insert (or inserts) are digested with enzyme B. Is it possible to simulate that using dnacauldron? Thanks

veghp commented 2 years ago

Hi thanks for the feedback. I think that should be possible using the RestrictionLigationMix class, and specifying multiple enzymes in a list.

If that doesn't work, you can try creating StickyEndFragments and feeding them to the StickyEndAssemblyMix class.

This file shows how the classes work together in a simulation: https://github.com/Edinburgh-Genome-Foundry/DnaCauldron/blob/master/dnacauldron/README.md

Let me know if you have trouble with the implementation and I'll try and look into it.

toriapetrova commented 3 months ago

Hi, thank you for the great package and documentation. I would like to simulate a Type2s-like assembly where the acceptor and the inserts are digested by different enzymes. In other words, the acceptor is digested with enzyme A, and the insert (or inserts) are digested with enzyme B. Is it possible to simulate that using dnacauldron? Thanks

Hi, I am currently trying to do the same thing. Did it work for you and if yes which approach did you use? Thank you!

toriapetrova commented 2 months ago

Sorry for asking again but would it be possible to do a simulation of Type2s-restriction assembly from an assembly plan , but in the case where the backbone and the insert are digested by different enzymes?

veghp commented 2 months ago

Hi @toriapetrova , this is a problem that interests us as well, and I have planned making a script that will do it using DNA Cauldron elements.

I'll update on progress here.

veghp commented 1 month ago

An example code answer to the original question, digesting with multiple enzymes (at the same time):

from Bio import SeqIO
import dnacauldron as dc

records = dc.biotools.load_records_from_files(folder="part_records/", use_file_names_as_ids=True)
mix = dc.RestrictionLigationMix(
        parts=records,
        enzymes=["BsmBI", "BsaI"],
        fragment_filters=[dc.Filter.NoRestrictionSiteFilter("BsmBI"), dc.Filter.NoRestrictionSiteFilter("BsaI")],
        name="restriction_mix",
        annotate_fragments_with_parts=True,)

counter = 0  #  in case there are more than one product
for assembly_record in mix.compute_circular_assemblies():
    name = "record_" + str(counter) + ".gb"
    SeqIO.write(assembly_record, name), format="genbank")
    counter += 1

For using the assembly class, or an assembly plan, the original classes will have to be extended. I'll look into that as well.