Skip to content

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

@dave-doty

Description

@dave-doty

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:

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, 30).move(10).with_name('strand 1').with_idt(plate='plate 1', well='B3')

plate_maps = design.plate_maps_markdown(well_marker=lambda well: well, strands=[design.strands[0], design.strands[3]])
plate_map = plate_maps['plate 1']
print(plate_map)

would print

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions