Skip to content

Dev#256

Merged
dave-doty merged 16 commits intomainfrom
dev
Dec 4, 2022
Merged

Dev#256
dave-doty merged 16 commits intomainfrom
dev

Conversation

@dave-doty
Copy link
Copy Markdown
Member

@dave-doty dave-doty commented Dec 4, 2022

Release notes

new method Design.base_pairs()

This method returns a dict mapping helix idx's where base pairs exist to a list of offsets where those base pairs are.

Domain/Extension/Loopout colors

Individual Domain's, Extension's, and Loopout's now have a color field. If specified, then this overrides the field Strand.color in the display. There is also a new method StrandBuilder.with_domain_color():

helices = [sc.Helix(max_offset=100) for _ in range(4)]
design = sc.Design(helices=helices, grid=sc.square)

red = sc.Color(255, 0, 0)
dark_red = sc.Color(150, 0, 0)
green = sc.Color(0, 255, 0)
dark_green = sc.Color(0, 150, 0)
blue = sc.Color(0, 0, 255)
dark_blue = sc.Color(0, 0, 150)
black = sc.Color(0, 0, 0)

design.draw_strand(0, 0) \
    .extension_5p(num_bases=5).with_domain_color(red) \
    .move(8).with_domain_color(green) \
    .loopout(1, 5).with_domain_color(dark_blue) \
    .move(-8).with_domain_color(dark_red) \
    .cross(2) \
    .move(8).with_domain_color(dark_green) \
    .cross(3) \
    .move(-8) \
    .extension_3p(num_bases=5).with_domain_color(black) \
    .with_color(blue)

image

@dave-doty dave-doty merged commit 13d4e0e into main Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant