v0.20.0
Release notes
BREAKING CHANGE: Minimum Python version is 3.9
The minimum Python version has been changed to 3.9. Technically there is not yet any part of the scadnano package that actually depends on 3.9 features; mainly this is done because support is being dropped for older Python versions in other tools, for example the unit tests that are run whenever we update the github repo no longer support older Python versions.
As of version 0.20.0, you can still install scadnano with Python version 3.7 or 3.8 by using the option --ignore-requires-python with pip: pip install scadnano --ignore-requires-python https://stackoverflow.com/questions/75726452/can-i-force-the-install-of-a-package-that-requires-a-newer-python-version-than-t However, future versions of scadnano may use newer features of Python, so it is advisable to upgrade to the latest Python version now for maximum future compatibility.
BREAKING CHANGE: parameter only_strands_with_idt changed to only_strands_with_vendor_fields
Version 0.19.0 changed some names of fields and classes from IDT-specific names to the more generic "vendor fields". However, the parameter only_strands_with_idt in a few methods was not at that time changed to only_strands_with_vendor_fields; now that parameter name has been changed as well in version 0.20.0.
HelixGroups custom geometry
See also UC-Davis-molecular-computing/scadnano#993 (comment).
There is a new optional field HelixGroup.geometry, which overrides the Geometry parameters of the Design.geometry field. For instance, the following code:
import scadnano as sc
def create_design() -> sc.Design:
group0 = sc.HelixGroup(grid=sc.square)
group1 = sc.HelixGroup(grid=sc.square,
# NOTE: here's the custom geometry for helix 1
geometry=sc.Geometry(bases_per_turn=18),
position=sc.Position3D(0, 3, 0))
groups = {"group 0": group0, "group 1": group1}
helices = [sc.Helix(idx=idx, max_offset=40, group=group) for idx, group in
[(0, "group 0"), (1, "group 1")]]
design = sc.Design(helices=helices, groups=groups, strands=[])
design.draw_strand(0, 0).move(40)
design.draw_strand(0, 40).move(-40)
design.draw_strand(1, 0).move(40)
design.draw_strand(1, 40).move(-40)
return design
if __name__ == '__main__':
d = create_design()
d.write_scadnano_file(directory='output_designs')produces this design with helix 0 having 10.5 base pairs per turn, and helix 1 having 18 base pairs per turn:
Commits
- 3600d1a: changed idt references to vendor_fields (David Doty) #313
- e8905fa: fixes #304: Typo in
set_dna_sequencecomment (David Doty) #313 - d9cd906: closes #306: allow per-helix-group geometry (David Doty) #307
- c597888: removed xlwt from environment.yml (David Doty) #307
- d6a52bd: Update run_unit_tests.yml (David Doty) #307
- efce159: fixed group-specific geometry in oxdna/oxview export (David Doty) #313
- 0c435bf: Update scadnano.py (David Doty) #313
- 2795055: fixed issue 309 by rotating helix position by group's orientation before adding to helix group's offset (DanielHader) #312
- cf75e42: Update scadnano.py (David Doty) #312
- b7afcd2: removed assignment of
NonetoDesign.helicesandDesign.groupssince constructor sets them anyway (David Doty) #313 - abc8435: made
StrandBuildera dataclass and added documentation for fields (David Doty) #313 - c4f64ba: bumped minimum Python version to 3.9 and bumped version to 0.20.0 (David Doty) #313