@@ -6609,17 +6609,17 @@ def _cadnano_v2_place_crossover(helix_from_dct: Dict[str, Any], helix_to_dct: Di
6609
6609
helix_to_dct [strand_type ][start_to ][:2 ] = [helix_from , start_from ]
6610
6610
elif forward_from and forward_to :
6611
6611
helix_from_dct [strand_type ][end_from - 1 ][2 :] = [helix_to , start_to ]
6612
- helix_to_dct [strand_type ][end_to - 1 ][:2 ] = [helix_from , start_from ]
6613
- if helix_from_dct ["row" ]% 2 != helix_to_dct ["row" ]% 2 :
6612
+ helix_to_dct [strand_type ][end_to - 1 ][:2 ] = [helix_from , start_from ]
6613
+ if helix_from_dct ["row" ] % 2 != helix_to_dct ["row" ] % 2 :
6614
6614
raise ValueError ("Paranemic crossovers are only allowed between helices that have the same parity of "
6615
6615
f"row number, here helix num { helix_from_dct ['num' ]} and helix num "
6616
6616
f"{ helix_to_dct ['num' ]} have different parity of row number: respectively "
6617
6617
f"{ helix_from_dct ['row' ]} and { helix_to_dct ["row" ]} " )
6618
6618
6619
6619
elif not forward_from and not forward_to :
6620
6620
helix_from_dct [strand_type ][start_from ][2 :] = [helix_to , end_to - 1 ]
6621
- helix_to_dct [strand_type ][end_to - 1 ][:2 ] = [helix_from , start_from ]
6622
- if helix_from_dct ["row" ]% 2 != helix_to_dct ["row" ]% 2 :
6621
+ helix_to_dct [strand_type ][end_to - 1 ][:2 ] = [helix_from , start_from ]
6622
+ if helix_from_dct ["row" ] % 2 != helix_to_dct ["row" ] % 2 :
6623
6623
raise ValueError ("Paranemic crossovers are only allowed between helices that have the same parity of "
6624
6624
f"row number, here helix num { helix_from_dct ['num' ]} and helix num "
6625
6625
f"{ helix_to_dct ['num' ]} have different parity of row number: respectively "
@@ -6661,9 +6661,6 @@ def _cadnano_v2_place_strand(self, strand: Strand, dct: dict,
6661
6661
next_helix = dct ['vstrands' ][next_helix_id ]
6662
6662
self ._cadnano_v2_place_crossover (which_helix , next_helix ,
6663
6663
domain , next_domain , strand_type )
6664
-
6665
-
6666
-
6667
6664
6668
6665
# if the strand is circular, we need to close the loop
6669
6666
if strand .circular :
@@ -6817,7 +6814,6 @@ def to_cadnano_v2_serializable(self, name: str = '') -> Dict[str, Any]:
6817
6814
6818
6815
for strand in self .strands :
6819
6816
self ._cadnano_v2_place_strand (strand , dct , helices_ids_reverse )
6820
-
6821
6817
6822
6818
return dct
6823
6819
0 commit comments