Modifier and Type | Class and Description |
---|---|
static class |
Bond.BondInfo
A class for storing the indices of bonded nucleotides instead of direct references.
|
static class |
Bond.MultiLoopRole |
Modifier and Type | Field and Description |
---|---|
Nuc |
n3 |
Nuc |
n5 |
BondType |
type
S1 and S2 represent the strand indices, N1 and N2 represent the nucleotide indices within each respective strand.
|
Constructor and Description |
---|
Bond(Nuc n1,
Nuc n2) |
Bond(Nuc n1,
Nuc n2,
BondType type) |
Modifier and Type | Method and Description |
---|---|
Bond |
clone() |
static int |
compare(Bond lhs,
Bond rhs) |
int |
compareTo(Bond other) |
boolean |
contains(Nuc test) |
Motif.Helix |
getHelix() |
Bond.MultiLoopRole |
getMultiLoopRole(Nuc ref)
Determine whether this bond is the "entrance" ("Trunk") to a Multi-Branch Loop by passing in
another reference nucleotide that is in the same loop.
|
Nuc |
getNuc3() |
Nuc |
getNuc5() |
Nuc |
getOther(Nuc n)
Given a nucleotide on one side of the bond, this returns the nucleotide on the other side.
|
RnaScene |
getScene() |
BondType |
getType() |
boolean |
isFirst() |
boolean |
isHybrid()
Whether this bond represents an inter-molecular bond (i.e.
|
boolean |
isLast() |
boolean |
isOrdered()
Returns true if the nucleotides are in canonical order.
|
boolean |
isTruePair()
Returns true for any bond that is not a PseudoKnot bond or
a Prohibited-Constraint Bond.
|
Nuc |
left(Nuc ref) |
void |
makeOrdered() |
Vec2D |
midpoint() |
java.awt.geom.Point2D |
midpoint(java.awt.geom.Point2D assignTo)
Returns the midpoint between the two nucleotides in the bond.
|
Bond |
nextInHelix() |
Bond |
nextInHelix(int direction) |
Vec2D |
normal() |
Vec2D |
normal(Vec2D assignTo)
Returns a Vec2D that represents the direction normal to the bond -- i.e.
|
Bond |
prevInHelix() |
Nuc |
right(Nuc ref)
Assume we are traveling around a multi-branch loop from 5' to 3'.
|
private void |
swap()
Swap the order of the nucleotides.
|
java.lang.String |
toString() |
void |
unpair() |
public Nuc n3
public Nuc n5
public BondType type
public Bond clone()
clone
in class java.lang.Object
public int compareTo(Bond other)
compareTo
in interface java.lang.Comparable<Bond>
public boolean contains(Nuc test)
public Motif.Helix getHelix()
public Bond.MultiLoopRole getMultiLoopRole(@Nullable Nuc ref)
ref
- Any other nucleotide that is in the same MultiLoop as this Nuc.
This is used for reference in cases where it is ambiguous which
loop is being traversed. This ONLY occurs when this nucleotide is
in a SINGLE-BP helix, therefore its basepair is both the FIRST and
the LAST basepair.public Nuc getNuc3()
public Nuc getNuc5()
@Nullable public Nuc getOther(Nuc n)
public RnaScene getScene()
public boolean isFirst()
public boolean isHybrid()
public boolean isLast()
public boolean isOrdered()
N1.strand < N2.strand
or N1.strand == N2.strand && N1.index <= N2.index
.
The function also returns true if both nucleotides are null or if N2 is null (but N1 is not).public boolean isTruePair()
public void makeOrdered()
public Vec2D midpoint()
public java.awt.geom.Point2D midpoint(@Nullable java.awt.geom.Point2D assignTo)
public Bond nextInHelix()
public Bond nextInHelix(int direction)
public Vec2D normal()
public Vec2D normal(@Nullable Vec2D assignTo)
public Bond prevInHelix()
public Nuc right(Nuc ref)
Nuc.getNext()
on unpaired nucleotides and
jumping across branches by calling right(Nuc)
()} on paired Nucs.
(or alternatively by calling Nuc.getPrev()
on unpaired nucleotides and
left(Nuc)
()}.ref
- Any other nucleotide that is in the same MultiLoop as this Nuc.
This is used for reference in cases where it is ambiguous which
loop is being traversed. This ONLY occurs when this nucleotide is
in a SINGLE-BP helix, therefore its basepair is both the FIRST and
the LAST basepair.private void swap()
public java.lang.String toString()
toString
in class java.lang.Object
public void unpair()