Skip to content

Commit

Permalink
attempt to fix cadnano export bug (still not fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Nov 22, 2024
1 parent b350bab commit 8cf86d8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/export_cadnano_v2_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,9 @@ main() {
});

test('test_paranemic_crossover_other_direction', () async {
var helices = [
Helix(idx: 1, max_offset: 64, grid_position: GridPosition(19, 14), grid: Grid.square),
Helix(idx: 0, max_offset: 64, grid_position: GridPosition(19, 15), grid: Grid.square),
Helix(idx: 3, max_offset: 64, grid_position: GridPosition(19, 16), grid: Grid.square),
Helix(idx: 2, max_offset: 64, grid_position: GridPosition(19, 17), grid: Grid.square),
];
var design = Design(helices: helices, grid: Grid.square);
design = design.draw_strand(3, 24).to(8).cross(1, 24).to(8).as_scaffold().commit();
design = design.draw_strand(2, 50).to(24).cross(0, 50).to(24).commit();
String filename = 'test_paranemic_crossover_other_direction.sc';
Design design = Design.from_json_str(
await get_text_file_content('../test/tests_inputs/cadnano_v2_export/${filename}'))!;

String output_json = to_cadnano_v2_json(design);
Design output_design = Design.from_cadnano_v2_json_str(output_json);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "0.19.4",
"grid": "square",
"helices": [
{"grid_position": [19, 14], "idx": 1, "max_offset": 64},
{"grid_position": [19, 15], "idx": 0, "max_offset": 64},
{"grid_position": [19, 16], "idx": 3, "max_offset": 64},
{"grid_position": [19, 17], "idx": 2, "max_offset": 64}
],
"strands": [
{
"color": "#0066cc",
"is_scaffold": true,
"domains": [
{"helix": 3, "forward": false, "start": 8, "end": 24},
{"helix": 1, "forward": false, "start": 8, "end": 24}
]
},
{
"color": "#007200",
"domains": [
{"helix": 2, "forward": false, "start": 24, "end": 50},
{"helix": 0, "forward": false, "start": 24, "end": 50}
]
}
]
}

0 comments on commit 8cf86d8

Please sign in to comment.