bionetgen.core package
Subpackages
- bionetgen.core.tools package
- bionetgen.core.utils package
Submodules
bionetgen.core.defaults module
- class bionetgen.core.defaults.BNGDefaults[source]
Bases:
object
A class to define the default configuration for cement apps
Attributes
- systemstr
the name of the OS that’s running the app
- bng_namestr
OS appropriate name of the BNG folder
- bng_pathstr
full absolute path to the BNG folder
- lib_pathstr
path to CLI library
- stdoutstr
the name of the subprocess attribute to pass stdout to
- stderrstr
the name of the subprocess attribute to pass stderr to
- configdict
dictionary containing the application defaults
- bannerstr
app banner that gets printed when ran with -v
bionetgen.core.exc module
- exception bionetgen.core.exc.BNGCompileError(model, message='There was an issue compiling your BNG model, please make sure your bionetgen.conf file points to a compiled CVODE 2.6.0')[source]
Bases:
BNGError
Error related to compiling C/Py file of BNG model.
- exception bionetgen.core.exc.BNGError[source]
Bases:
Exception
Base class for all PyBNG exceptions.
- exception bionetgen.core.exc.BNGFileError(bngl_path, message='There was an issue with your BNGL file')[source]
Bases:
BNGError
Error related to the BNGL file.
- exception bionetgen.core.exc.BNGModelError(model, message='There was an issue with your BNG model')[source]
Bases:
BNGError
Error related to the BNG model object.
- exception bionetgen.core.exc.BNGParseError(bngl_path=None, message='There was an issue with parsing your BNGL file')[source]
Bases:
BNGError
Error related to parsing a BNGL file.
- exception bionetgen.core.exc.BNGPerlError[source]
Bases:
BNGError
Error related to BNG2.pl/existence of perl.
bionetgen.core.main module
- bionetgen.core.main.generate_notebook(app)[source]
Uses BNGNotebook class to write a Jupyter notebook from a given set of command line arguments
- bionetgen.core.main.graphDiff(app)[source]
Uses BNGGdiff object to calculate differences between two graphs (only works with graphml files generated by BioNetGen)
- bionetgen.core.main.plotDAT(app)[source]
Convenience function to plot dat/scan files from the CLI
Usage: plotDAT(inp, out, kw)
Arguments
- inpstr
input gdat/cdat/scan file to plot
- outstr
(optional) output file path, can be used to define the output format as well. Default is the current folder, filename is the same as the input file and default format is PNG.
- kwdict
(optional) this is a set of keyword arguments you want to pass for certain matplotlib options. Check -h for details
- bionetgen.core.main.printInfo(app)[source]
Uses BNGInfo class to print BioNetGen information using arguments and config from Cement framework.
- bionetgen.core.main.runAtomizeTool(app)[source]
Uses AtomizeTool class to run atomizer from a set of arguments
bionetgen.core.notebook module
- class bionetgen.core.notebook.BNGNotebook(nb_template, **kwargs)[source]
Bases:
object
This is a class for writing BNG notebook from a template and given arguments.
Initalize with keywords to replace values in the template. E.g. BNGNotebook(template_file, TEST=”CHANGE”).write(outfile) will write the template file to outfile while changing every instance of “TEST” to “CHANGE”
Attributes
- templatestr
the notebook template to use
- odictdict
the dictionary built from keywords the class is initalized with
Methods
- write(outfile)
writes the template file to outfile, replacing keywords