Commit 1be9c0bb authored by cmaffeo2's avatar cmaffeo2
Browse files

Connections between ssDNA and dsDNA should now always be of the type...

Connections between ssDNA and dsDNA should now always be of the type 'sscrossover', never 'intrahelical'

The latter could result in bonds between the end of dsDNA and ssDNA
from forming if the dsDNA end was also bound to another helix, but
this may remain an issue for three-way dsDNA junctions.
parent 5e0f6bab
......@@ -896,6 +896,12 @@ class Segment(ConnectableElement, Group):
assert( end.type_ in ("end3","end5") )
assert( end1.type_ != end2.type_ )
if ((isinstance(end1.container, SingleStrandedSegment) and
isinstance(end2.container, DoubleStrandedSegment)) or
(isinstance(end1.container, DoubleStrandedSegment) and
isinstance(end1.container, SingleStrandedSegment))):
type_ = 'sscrossover'
## Remove other connections involving these points
if end1.connection is not None:
if debug: print("WARNING: reconnecting {}".format(end1))
......@@ -1407,7 +1413,7 @@ class SingleStrandedSegment(Segment):
print("WARNING: reconnecting {}".format(end2))
end2.connection.delete()
conn = Connection( end1, end2, type_="intrahelical" )
conn = Connection( end1, end2, type_="intrahelical" if isinstance(other,SingleStrandedSegment) else "sscrossover")
seg1._connect( seg2, conn, in_3prime_direction=True )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment