Closed dave-doty closed 2 years ago
Design.plate_maps
parameter well_marker
to be function of well positionThis 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 | | | | | | | | | | | | |
Currently
well_marker
is a constant string. Allow it also to be a function taking the well position as input as a string (e.g.,"A1"
or"C7"
), and returning a string to put in that position. For example giving the identity function would put the well position itself:would print