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

def Bio.Nexus.Nodes.Chain.is_parent_of (   self,
  parent,
  grandchild 
) [inherited]
Check if grandchild is a subnode of parent: is_parent_of(self,parent,grandchild).

Definition at line 96 of file Nodes.py.

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

Referenced by Bio.Nexus.Nodes.Chain.is_parent_of(), and Bio.Nexus.Nodes.Chain.trace().

00096 
    def is_parent_of(self,parent,grandchild):
        """Check if grandchild is a subnode of parent: is_parent_of(self,parent,grandchild)."""
        if grandchild==parent or grandchild in self.chain[parent].get_succ():
            return True
        else:
            for sn in self.chain[parent].get_succ():
                if self.is_parent_of(sn,grandchild):
                    return True
            else:
                return False

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