Beispiel #1
0
    def draw(self, **kwargs):
        """ Draws an SBMLDiagram of the current model.

        To set the width of the output plot provide the 'width' argument.
        Species are drawn as white circles (boundary species
        shaded in blue), reactions as grey squares.
        Currently only the drawing of medium-size networks is supported.
        """
        if any([ os.access( os.path.join( p, 'dot' ), os.X_OK ) for p in os.environ['PATH'].split( os.pathsep )]):
            warnings.warn("Graphviz is not installed in your machine. 'draw' command cannot produce a diagram",
                Warning, stacklevel=2)
        else:
            from visualization.sbmldiagram import SBMLDiagram
            diagram = SBMLDiagram(self.getSBML())
            diagram.draw(**kwargs)
Beispiel #2
0
    def draw(self, **kwargs):
        """ Draws an SBMLDiagram of the current model.

        To set the width of the output plot provide the 'width' argument.
        Species are drawn as white circles (boundary species
        shaded in blue), reactions as grey squares.
        Currently only the drawing of medium-size networks is supported.
        """
        if any([ os.access( os.path.join( p, 'dot' ), os.X_OK ) for p in os.environ['PATH'].split( os.pathsep )]):
            warnings.warn("Graphviz is not installed in your machine. 'draw' command cannot produce a diagram",
                Warning, stacklevel=2)
        else:
            from visualization.sbmldiagram import SBMLDiagram
            diagram = SBMLDiagram(self.getSBML())
            diagram.draw(**kwargs)
Beispiel #3
0
    def draw(self, **kwargs):
        """ Draws an SBMLDiagram of the current model.

        To set the width of the output plot provide the 'width' argument.
        Species are drawn as white circles (boundary species
        shaded in blue), reactions as grey squares.
        Currently only the drawing of medium-size networks is supported.
        """
        if sys.platform == 'win32' and 'Graphviz' not in os.environ['PATH']:
            warnings.warn("Graphviz is not installed in your machine. 'draw' command cannot produce a diagram",
                Warning, stacklevel=2)
        elif sys.platform == 'darwin' and 'graphviz' not in os.environ['PATH']:
            warnings.warn("Graphviz is not installed in your machine. 'draw' command cannot produce a diagram",
                Warning, stacklevel=2)
        else:
            from visualization.sbmldiagram import SBMLDiagram
            diagram = SBMLDiagram(self.getSBML())
            diagram.draw(**kwargs)