-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from UC-Davis-molecular-computing/dev
Dev
- Loading branch information
Showing
7 changed files
with
2,850 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import scadnano as sc | ||
|
||
|
||
def create_design() -> sc.Design: | ||
num_domains = 9 | ||
helices = [sc.Helix(max_offset=(num_domains) * 8)] | ||
design: sc.Design = sc.Design(helices=helices, strands=[], grid=sc.square) | ||
design.strand(0, (num_domains - 1) * 8) \ | ||
.move(-8).with_domain_name('domain 8*') \ | ||
.move(-8).with_domain_name('domain 7*') \ | ||
.move(-8).with_domain_name('domain 6*') \ | ||
.move(-8).with_domain_name('domain 5*') \ | ||
.move(-8).with_domain_name('domain 4*') \ | ||
.move(-8).with_domain_name('domain 3*') \ | ||
.move(-8).with_domain_name('domain 2*') \ | ||
.move(-8).with_domain_name('domain 1*') \ | ||
.with_name('bottom strand') | ||
|
||
# domain names match | ||
design.strand(0, 0).move(8).with_domain_name('domain 1').with_name('top strand 1') | ||
|
||
# domains are aligns but names mismatch | ||
design.strand(0, 8).move(8).with_domain_name('domain 50').with_name('top strand 2') | ||
|
||
# domain names match | ||
design.strand(0, 16).move(8).with_domain_name('domain 3').with_name('top strand 3') | ||
|
||
# domain names are the same, not complementary | ||
design.strand(0, 24).move(8).with_domain_name('domain 4*').with_name('top strand 4') | ||
|
||
# domain names match but domains are mis-aligned | ||
design.strand(0, 32).move(9).with_domain_name('domain 5').with_name('top strand 5') | ||
|
||
# domain names match but domains are mis-aligned | ||
design.strand(0, 48).move(7).with_domain_name('domain 7').with_name('top strand 7') | ||
|
||
# no overlap so no mismatch | ||
design.strand(0, 64).move(8).with_domain_name('domain 9').with_name('top strand 9') | ||
|
||
return design | ||
|
||
|
||
if __name__ == '__main__': | ||
design = create_design() | ||
design.write_scadnano_file(directory='output_designs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"version": "0.12.0", | ||
"grid": "square", | ||
"helices": [ | ||
{"grid_position": [0, 0]} | ||
], | ||
"strands": [ | ||
{ | ||
"name": "bottom strand", | ||
"color": "#f74308", | ||
"domains": [ | ||
{"name": "domain 8*", "helix": 0, "forward": false, "start": 56, "end": 64}, | ||
{"name": "domain 7*", "helix": 0, "forward": false, "start": 48, "end": 56}, | ||
{"name": "domain 6*", "helix": 0, "forward": false, "start": 40, "end": 48}, | ||
{"name": "domain 5*", "helix": 0, "forward": false, "start": 32, "end": 40}, | ||
{"name": "domain 4*", "helix": 0, "forward": false, "start": 24, "end": 32}, | ||
{"name": "domain 3*", "helix": 0, "forward": false, "start": 16, "end": 24}, | ||
{"name": "domain 2*", "helix": 0, "forward": false, "start": 8, "end": 16}, | ||
{"name": "domain 1*", "helix": 0, "forward": false, "start": 0, "end": 8} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 1", | ||
"color": "#57bb00", | ||
"domains": [ | ||
{"name": "domain 1", "helix": 0, "forward": true, "start": 0, "end": 8} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 2", | ||
"color": "#888888", | ||
"domains": [ | ||
{"name": "domain 50", "helix": 0, "forward": true, "start": 8, "end": 16} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 3", | ||
"color": "#32b86c", | ||
"domains": [ | ||
{"name": "domain 3", "helix": 0, "forward": true, "start": 16, "end": 24} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 4", | ||
"color": "#333333", | ||
"domains": [ | ||
{"name": "domain 4*", "helix": 0, "forward": true, "start": 24, "end": 32} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 5", | ||
"color": "#320096", | ||
"domains": [ | ||
{"name": "domain 5", "helix": 0, "forward": true, "start": 32, "end": 41} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 7", | ||
"color": "#03b6a2", | ||
"domains": [ | ||
{"name": "domain 7", "helix": 0, "forward": true, "start": 48, "end": 55} | ||
] | ||
}, | ||
{ | ||
"name": "top strand 9", | ||
"color": "#7300de", | ||
"domains": [ | ||
{"name": "domain 9", "helix": 0, "forward": true, "start": 64, "end": 72} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.