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

Linear assemblies? #5

Open
gjerman opened this issue Sep 28, 2020 · 3 comments
Open

Linear assemblies? #5

gjerman opened this issue Sep 28, 2020 · 3 comments

Comments

@gjerman
Copy link

gjerman commented Sep 28, 2020

I am trying to simulate a three fragment golden gate type assembly where the end product is not a circular dna but a linear dna.

If i run the below code with three fragments suitable for circular assembly i get the expected ouput of:

  • circular connection graph pdf
  • final assembly genbank file
  • summary.csv with one correct assembly consiting of frag1, frag2 and frag3 and no error.csv file

If i run the code with three fragments that are suitable for linear assembly, but cannot be circularized it get:

  • linear connection graph pdf
  • no final assembly genbank file
  • no summary.csv file and error.csv contains "unused_parts: FRAG1 & FRAG2 & FRAG3"

Is there a way to specify that I am expecting a linear assembly and not a cirucular?

repository = dc.SequenceRepository()
repository.import_records(files=['seqs.fa'])

parts_list = list(repository.collections["parts"])

assembly = dc.Type2sRestrictionAssembly(
                                        name="golden_gate",
                                        parts=parts_list,
                                        expected_constructs="any_number",
                                        )

simulation = assembly.simulate(sequence_repository=repository)

report_writer = dc.AssemblyReportWriter(include_mix_graphs=True, include_part_plots=True)

simulation.write_report(
                        target="output",
                        report_writer=report_writer,
                        )

golden_gate_type2s_mix_parts_graph.pdf

@Zulko
Copy link
Member

Zulko commented Sep 28, 2020

The short answer is that DnaCauldron can export linear assembly sequences, but the interface you are using doesn't support it yet.There are two ways forward:

  1. Use a restriction mix instead and its compute_linear_assemblies method. It's just a few more line to get the records and the plots. Should be something like that:
mix = dc.RestrictionLigationMix(parts, enzyme)
for assembly in mix.compute_linear_assemblies():
    SeqIO.write(assembly, "record.gb") # assemly should be a biopython record
ax = mix.plot_connections_graph()
ax.figure.savefig("connections_graph.pdf")
  1. There may be a way to expand the Type2sRestrictionAssembly class and in particular this line in the code so it will support linear assemblies.

@gjerman
Copy link
Author

gjerman commented Sep 28, 2020

Great, I found the method compute_linear_assemblies() on the ConstructsMixin class but was scratching my head trying to figure out how to apply it. Will try you snippet asap. Thank you,.

@veghp
Copy link
Member

veghp commented May 26, 2022

A solution for linear assembly, using oligos, can be found here: #14 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants