Cadnano2 import of crossover to same helix#214
Conversation
|
|
||
| def test_paranemic_crossover(self) -> None: | ||
| file_name = "test_paranemic_crossover" | ||
| file_name = "test_crossover_to_same_helix" |
There was a problem hiding this comment.
Is this a typo? Seems like file name should be "test_paranemic_crossover" instead of "test_crossover_to_same_helix"
| filename=f'{file_name}.{sc.default_scadnano_file_extension}') | ||
|
|
||
| def test_same_helix_crossover(self) -> None: | ||
| file_name = "test_paranemic_crossover" |
There was a problem hiding this comment.
Is this a typo? Seems like file name should be "test_same_helix_crossover" instead of "test_paranemic_crossover"
There was a problem hiding this comment.
I'd call it test_same_helix_crossover. A paranemic crossover is one that connects domains going the same direction on both helices, which is technically true here, but this is more a "fake" crossover that doesn't really represent the DNA geometry. (Unlike paranemic crossover, which is an actual DNA motif.)
| # | ||
| # design.write_scadnano_file(directory=self.output_path, | ||
| # filename=f'test_32_helix_rectangle.{sc.default_scadnano_file_extension}') | ||
| design.write_scadnano_file(directory=self.output_path, |
There was a problem hiding this comment.
would it be possible to leave these write_scadnano_file lines commented? They are only there for debugging purposes. We don't want unit tests to write files that we don't need.
Description
Crossovers to same helix as in attached filed were badly handled.
crossover-to-same-helix.zip
The fix consisted in adding one more case to the condition that decides whether or not to add a crossover :
I have added hopefully clearer comments.
Related Issue
#209
Motivation and Context
Fixes #209
How Has This Been Tested?
tests.scadnano_tests.TestImportCadnanoV2.test_crossover_to_same_helix.scScreenshots (if appropriate):