Skip to content

Commit b00105b

Browse files
committed
formatting
1 parent 03d15db commit b00105b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

scadnano/scadnano.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6609,17 +6609,17 @@ def _cadnano_v2_place_crossover(helix_from_dct: Dict[str, Any], helix_to_dct: Di
66096609
helix_to_dct[strand_type][start_to][:2] = [helix_from, start_from]
66106610
elif forward_from and forward_to:
66116611
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:
66146614
raise ValueError("Paranemic crossovers are only allowed between helices that have the same parity of "
66156615
f"row number, here helix num {helix_from_dct['num']} and helix num "
66166616
f"{helix_to_dct['num']} have different parity of row number: respectively "
66176617
f"{helix_from_dct['row']} and {helix_to_dct["row"]}")
66186618

66196619
elif not forward_from and not forward_to:
66206620
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:
66236623
raise ValueError("Paranemic crossovers are only allowed between helices that have the same parity of "
66246624
f"row number, here helix num {helix_from_dct['num']} and helix num "
66256625
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,
66616661
next_helix = dct['vstrands'][next_helix_id]
66626662
self._cadnano_v2_place_crossover(which_helix, next_helix,
66636663
domain, next_domain, strand_type)
6664-
6665-
6666-
66676664

66686665
# if the strand is circular, we need to close the loop
66696666
if strand.circular:
@@ -6817,7 +6814,6 @@ def to_cadnano_v2_serializable(self, name: str = '') -> Dict[str, Any]:
68176814

68186815
for strand in self.strands:
68196816
self._cadnano_v2_place_strand(strand, dct, helices_ids_reverse)
6820-
68216817

68226818
return dct
68236819

0 commit comments

Comments
 (0)