Release notes for when this gets merged into master:
Exporting IDT files with default values for idt fields no longer requires first modifying the Strand.idt field
It is no longer necessary to modify the design to set the field Strand.idt in each Strand before calling the methods that export DNA sequences in IDT-formatted files. For staple strands with no idt field, a reasonable default for each value will be chosen.
So it is now possible to do this:
import scadnano as sc
design = sc.Design(helices=[sc.Helix(max_offset=100) for _ in range(2)], grid=sc.square)
design.strand(0, 0).move(8).cross(1).move(-8)
design.strand(0, 16).move(-8).cross(1).move(8)
design.assign_dna(strands[0], 'A'*16)
design.assign_dna(strands[1], 'C'*16)
# before the change, the next line would have skipped writing the two strands since they have no idt field set,
# now, reasonable defaults are used, without requiring the side-effect of writing the field Strand.idt
design.write_idt_plate_excel_file()
# to skip exporting strands that lack an idt field, specify the parameter only_strands_with_idt
# below, only the newly added strand with T's will be exported; the previous two will not
design.strand(0, 24).move(8).cross(1).move(-8).with_idt('only_strand_to_export')
design.assign_dna(strands[2], 'T'*16)
design.write_idt_plate_excel_file(only_strands_with_idt=True)
This implies several changes in the API
[BREAKING CHANGE] Changed the export methods so that, by default (with no parameters specified), they behave differently. In particular, now by default they will export DNA sequences for all non-scaffold strands, using the idt field of the Strand if it is present, and otherwise using reasonable defaults, the same defaults that previously were stored in the Strand by calling Strand.set_default_idt().
[BREAKING CHANGE] Removed the following:
field Strand.use_default_idt
method Strand.set_default_idt()
method Design.set_default_idt()
parameter use_idt_defaults in function origami_rectangle.create()
Now, if you want to set a Strand to have an idt field, it must be explicit, although the IDTFields constructor only requires a name parameter, so it's as easy as strand.idt = IDTFields('name_of_strand') if you are happy with the defaults for other idt fields such as idt.purification.
[BREAKING CHANGE] Removed parameter warning_on_non_idt_strands from the IDT export methods on Design. Now, you can either ask those methods to skip exporting Strands lacking an idt field by setting the parameter only_strands_with_idt to True, or let all (non-scaffold) strands be exported by setting only_strands_with_idt to False (the default).
Added parameter export_scaffold to DNA sequence export methods to allow the scaffold(s) to be exported (False by default).
[BREAKING CHANGE] (This one is unrelated to exporting IDT files; it is related to the circular strands implemented in v0.13.4.) Since circular strands make it easier to use the Design.add_half_crossover and Design.add_full_crossover methods, we have removed the method Design.add_crossovers and the type Crossover. Previously, that method helped avoid creating circular strands by allowing one to build up a list of Crossovers and add them in bulk, where adding them one at a time would have resulted in an intermediate circular strand, even if the final result had all linear strands. Now that circular strands are supported, this is no longer needed. The recommended method of adding many crossovers at once is simply to call Design.add_half_crossover and/or Design.add_full_crossover repeatedly, i.e., replace
Release notes for when this gets merged into master:
Exporting IDT files with default values for idt fields no longer requires first modifying the Strand.idt field
It is no longer necessary to modify the design to set the field
Strand.idt
in each Strand before calling the methods that export DNA sequences in IDT-formatted files. For staple strands with no idt field, a reasonable default for each value will be chosen.So it is now possible to do this:
This implies several changes in the API
[BREAKING CHANGE] Changed the export methods so that, by default (with no parameters specified), they behave differently. In particular, now by default they will export DNA sequences for all non-scaffold strands, using the
idt
field of the Strand if it is present, and otherwise using reasonable defaults, the same defaults that previously were stored in the Strand by callingStrand.set_default_idt()
.[BREAKING CHANGE] Removed the following:
Strand.use_default_idt
Strand.set_default_idt()
Design.set_default_idt()
use_idt_defaults
in functionorigami_rectangle.create()
Now, if you want to set a Strand to have anidt
field, it must be explicit, although theIDTFields
constructor only requires aname
parameter, so it's as easy asstrand.idt = IDTFields('name_of_strand')
if you are happy with the defaults for otheridt
fields such asidt.purification
.[BREAKING CHANGE] Removed parameter
warning_on_non_idt_strands
from the IDT export methods onDesign
. Now, you can either ask those methods to skip exporting Strands lacking anidt
field by setting the parameteronly_strands_with_idt
to True, or let all (non-scaffold) strands be exported by settingonly_strands_with_idt
to False (the default).Added parameter
export_scaffold
to DNA sequence export methods to allow the scaffold(s) to be exported (False by default).[BREAKING CHANGE] (This one is unrelated to exporting IDT files; it is related to the circular strands implemented in v0.13.4.) Since circular strands make it easier to use the
Design.add_half_crossover
andDesign.add_full_crossover
methods, we have removed the methodDesign.add_crossovers
and the typeCrossover
. Previously, that method helped avoid creating circular strands by allowing one to build up a list of Crossovers and add them in bulk, where adding them one at a time would have resulted in an intermediate circular strand, even if the final result had all linear strands. Now that circular strands are supported, this is no longer needed. The recommended method of adding many crossovers at once is simply to callDesign.add_half_crossover
and/orDesign.add_full_crossover
repeatedly, i.e., replacewith this instead: