Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio.Nexus.Nodes.Chain.add (   self,
  node,
  prev = None 
) [inherited]
Attaches node to another: (self, node, prev).

Definition at line 40 of file Nodes.py.

References Bio.Nexus.Nodes.Chain._get_id(), and Bio.Nexus.Nodes.Chain.chain.

Referenced by Bio.Restriction.Restriction.RestrictionBatch.__iadd__(), Bio.Nexus.Trees.Tree.__init__(), Bio.Nexus.Trees.Tree._add_subtree(), Bio.Restriction.Restriction.RestrictionBatch.get(), Bio.Nexus.Trees.Tree.split(), and Bio.Nexus.Trees.Tree.unroot().

00040 
    def add(self,node,prev=None):
        """Attaches node to another: (self, node, prev)."""
        if prev is not None and prev not in self.chain:
            raise ChainException('Unknown predecessor: '+str(prev))
        else:
            id=self._get_id()
            node.set_id(id)
            node.set_prev(prev)
            if prev is not None:
                self.chain[prev].add_succ(id)
            self.chain[id]=node
        return id

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index