Skip to content

v0.17.3

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Mar 13:36
· 246 commits to main since this release
93978f2

Release notes

allow other table formats besides Markdown in Design.plate_maps

In a jupyter notebook cell, put this code:

import scadnano as sc

helices = [sc.Helix(max_offset=100)]
design = sc.Design(helices=helices, strands=[], grid=sc.square)
design.draw_strand(0, 0).move(10).with_name('strand 0').with_idt(plate='plate 1', well='A1')
design.draw_strand(0, 10).move(10).with_name('strand 1').with_idt(plate='plate 1', well='A2')
design.draw_strand(0, 20).move(10).with_name('strand 2').with_idt(plate='plate 1', well='B2')
design.draw_strand(0, 30).move(10).with_name('strand 3').with_idt(plate='plate 1', well='B3')
design.draw_strand(0, 40).move(10).with_name('strand 4').with_idt(plate='plate 1', well='D7')

from IPython.display import display, Markdown
def dm(o):
    display(Markdown(o))

plate_map = design.plate_maps()[0]
dm(plate_map.to_table(tablefmt='html', vertical_borders=True))

It should render

The returned HTML uses inline styles to ensure there are vertical borders between columns of the table. The vertical borders make it easier to see which column a well is in. This is useful when rendering in a Jupyter notebook, since the inline styles will be preserved when saving the Jupyter notebook using the nbconvert tool: https://nbconvert.readthedocs.io/en/latest/

Any format supported by the tabular package is supported as tablefmt for the method PlateMap.to_table(). See API for more details: https://scadnano-python-package.readthedocs.io/en/latest/#scadnano.PlateMap.to_table

allow Design.plate_maps parameter well_marker to be function of well position

This code (note that strands do not require a name if using well_marker)

import scadnano as sc

helices = [sc.Helix(max_offset=100)]
design = sc.Design(helices=helices, strands=[], grid=sc.square)
design.draw_strand(0, 0).move(10).with_idt(plate='plate 1', well='A1')
design.draw_strand(0, 10).move(10).with_idt(plate='plate 1', well='A2')
design.draw_strand(0, 20).move(10).with_idt(plate='plate 1', well='B2')
design.draw_strand(0, 30).move(10).with_idt(plate='plate 1', well='B3')
design.draw_strand(0, 40).move(10).with_idt(plate='plate 1', well='D7')

plate_map = design.plate_maps()[0]
print(plate_map.to_table(well_marker=lambda x:x))

prints


### plate "plate 1"
|     | 1   | 2   | 3   | 4   | 5   | 6   | 7   | 8   | 9   | 10   | 11   | 12   |
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:-----|:-----|:-----|
| A   | A1  | A2  |     |     |     |     |     |     |     |      |      |      |
| B   |     | B2  | B3  |     |     |     |     |     |     |      |      |      |
| C   |     |     |     |     |     |     |     |     |     |      |      |      |
| D   |     |     |     |     |     |     | D7  |     |     |      |      |      |
| E   |     |     |     |     |     |     |     |     |     |      |      |      |
| F   |     |     |     |     |     |     |     |     |     |      |      |      |
| G   |     |     |     |     |     |     |     |     |     |      |      |      |
| H   |     |     |     |     |     |     |     |     |     |      |      |      |

Commits

  • 1efd9ad: Closes #149; store DNA sequence in domains and loopouts, not in strand (#223) (Benjamin Lee) #223
  • 9e1a287: corrected docstring for Design.draw_strand (David Doty) #226
  • 243562d: Update scadnano.py (David Doty) #226
  • 7ed1610: Update tutorial.md (David Doty) #226
  • f9e10b6: Update tutorial.md (David Doty) #226
  • 45bf3ed: Update tutorial.md (David Doty) #226
  • 48f6b54: Update tutorial.md (David Doty) #226
  • 6610ef3: Update tutorial.md (David Doty) #226
  • d6aa2ba: Update tutorial.md (David Doty) #226
  • 0addd6d: Update tutorial.md (David Doty) #226
  • 9ab30af: Update tutorial.md (David Doty) #226
  • b09632f: Update scadnano.py (David Doty) #226
  • 3fd2a86: Update scadnano.py (David Doty) #226
  • e9ab4bc: Update scadnano.py (David Doty) #226
  • 7d9764b: added documentation about idt_dna_sequence in docstring for Strand.dna_sequence property. (David Doty) #225
  • 1150ea0: closes #224: allow other table formats besides Markdown in Design.plate_maps and closes #222: allow Design.plate_maps parameter well_marker to be function of well position (David Doty) #225
  • 9ec66bb: added tabulate as dependency to tests (David Doty) #225
  • 08bbf35: Update scadnano.py (David Doty) #226
  • 2fb3d35: bumped version (David Doty) #226