Class Node

java.lang.Object
  extended by Node

public class Node
extends java.lang.Object

This class represents a node that is part of a tree data structure. A node represents an RNA loop structure that is part of a hairpin structure. A branch within the tree represents a hairpin structure that is build up by a number of loops, which are the nodes.

See also http://2008.igem.org/Team:TUDelft/Temperature_software

Author:
Bastiaan van den Berg
See Also:
Tree

Constructor Summary
Node(Tree tree, Node parent, int level, Loop loop, int energy)
          Constructs a new Node.
 
Method Summary
 void addChilds()
          This method builds up a whole tree by recursively adding childs.
 void getResults(java.util.ArrayList<java.lang.String> result, java.lang.String loop)
          This method returns the sequences of the hairpins that are the result after building this tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(Tree tree,
            Node parent,
            int level,
            Loop loop,
            int energy)
Constructs a new Node.

Parameters:
tree - The tree to which this node belongs.
parent - The parent node of this node.
level - The level on which this node resides within the tree.
loop - The loop that this node represents.
energy - The stacked energy from the root node to this node (the sum of all the energy values of the loops from this node to the root node)
Method Detail

addChilds

public void addChilds()
This method builds up a whole tree by recursively adding childs. All the loops that fit the template, fit the loop represented by this node (the loop is added to the right of this loop so the left base pair should be the same as the right base pair of this nodes loop), and that provide a hairpin with a stability profile that stays within the boundaries, are added as childs to this node. This method is then applied to all the just added childs.


getResults

public void getResults(java.util.ArrayList<java.lang.String> result,
                       java.lang.String loop)
This method returns the sequences of the hairpins that are the result after building this tree. This method should be called by the root node to obtain all the found hairpins. The results are obtained by recursively traversing the tree from top to bottom. As soon as a leaf node is found that is at the correct level (length of the hairpin - 1) we know this is a possible design of the hairpin and the sequence of this hairpin (represented by the branch to which this leaf belongs) is added to result.

Parameters:
result - An array in which the resulting hairpin designs are stored.
loop - The hairpin loop to add to the stacking region to make a whole hairpin sequence out of it.