Package: mackinac
Mackinac combines the ability ofModelSEEDto automatically
reconstruct metabolic models with the advanced analysis capabilities incobrapyto bridge the differences between
the two frameworks. Mackinac provides support for using the ModelSEED
web service to create draft genome-scale models from genomes available in thePathosystems Resource Integration Center(PATRIC) and creates a COBRA model from a ModelSEED model. If you are not aregistered PATRIC user,
you must complete anew user registrationto work with the ModelSEED web service.If you already have models available in ModelSEED, you can simply import and
create a COBRA model with thecreate_cobra_model_from_modelseed_model()function. You can then use all of the features in cobrapy to analyze,
inspect, explore, and draw conclusions from the model.You can also reconstruct and gap fill models using the ModelSEED
service for any organism with a genome available in PATRIC. Additional functions
are available for working with ModelSEED models, managing workspace objects,
getting information about PATRIC genomes, and calculating reaction likelihoods.Please use thecobrapy Google
Groupfor help.
Alternatively, you can usegitter.imfor quick questions
and discussions (faster response times).More information about opencobra is available at thewebsite.InstallationUse pip to install Mackinac fromPyPI(we recommend doing this
inside avirtual environment):pip install mackinacWeb service URLsMackinac uses web services provided by other organizations which can be offline,
the interface can change, or the URL can change. Mackinac uses these default URLs:ModelSEED web service athttp://p3c.theseed.org/dev1/services/ProbModelSEEDWorkspace web service athttps://p3.theseed.org/services/WorkspacePATRIC web service athttps://www.patricbrc.org/api/Alternate URLs include the following:Former production ModelSEED web service athttps://p3.theseed.org/services/ProbModelSEEDYou can change the URL used to connect to a web service as shown below:>>> import mackinac
>>> mackinac.modelseed.ms_client.url = 'http://p3c.theseed.org/dev1/services/ProbModelSEED'
>>> mackinac.workspace.ws_client.url = 'https://p3.theseed.org/services/Workspace'
>>> mackinac.genome.patric_url = 'https://www.patricbrc.org/api/'Direct installation in virtual environmentIf virtualenvwrapper is not installed,follow the directionsto install virtualenvwrapper. You should alsoupdate your shell startup file.Clone thegit repositoryto your
computer with this command:$ git clone https://github.com/mmundy42/mackinac.gitCreate a virtualenv for Mackinac with these commands:$ cd mackinac
$ mkvirtualenv mackinacUse the--pythonoption to select a specific version of Python for the
virtualenv. For example,python=python3to select the current python3
installed on the system.Note on macOS, matplotlib requires Python be installed as a framework but
virtualenv creates a non-framework build of Python. See thematplotlib FAQfor details on a workaround.Upgrade pip and setuptools to the latest versions with these commands:(mackinac)$ pip install --upgrade pip setuptoolsInstall all of the Mackinac dependencies with this command:(mackinac)$ pip install -r requirements.txtThis command can take a few minutes while numpy, pandas, and libsbml are
built in the virtualenv.Install the latest version of Mackinac with this command:(mackinac)$ python setup.py installInstall the pytest package with this command:(mackinac)$ pip install pytestYou need to provide a username and password for the tests to obtain an
authentication token. Substitute your PATRIC username and password and run
the tests with this command:(mackinac)$ TEST_USERNAME=<username> TEST_PASSWORD=<password> pytest mackinac/test -vRun examples in a notebookAn example of how to use Mackinac is provided in a notebook. Here’s how to start Jupyter and run
the notebook from the virtualenv.Install Jupyter with this command:(mackinac)$ pip install jupyterInstall a kernel that uses the virtualenv installation with this command:(mackinac)$ ipython kernel install --name "Mackinac_Python27" --userStart the Jupyter notebook server with this command:(mackinac)$ jupyter notebookJupyter opens a web page in your default browser with a file browser.Navigate to the “documentation_builder” folder and click on the “modelseed.ipynb”
notebook.After the notebook opens, from the “Kernel” menu, select “Change kernel” and
click on “Mackinac_Python27”.Now you can run the cells in the notebook.Release NotesVersion 0.8.4 (May 18, 2017)Fixed usages of deprecated cobra.core.Model.add_reaction() functionAdded another way to parse error returned by ModelSEED serverVersion 0.8.3 (May 8, 2017)Fixed setting reaction objective coefficient with cobra 0.6Version 0.8.2 (May 5, 2017)Removed dependency on a specific version of six packageUpdated directions for virtual environment installationSwitched default ModelSEED service URL to current active serverVersion 0.8.1 (March 15, 2017)Version corresponding to published paperHow to cite MackinacIf you use Mackinac for an analysis, please cite this paper:Mackinac: a bridge between ModelSEED and COBRApy to generate and analyze genome-scale
metabolic modelsReferencesCOBRApy: COnstraints-Based Reconstruction and Analysis for PythonHigh-throughput generation, optimization and analysis of genome-scale metabolic models(ModelSEED)PATRIC, the bacterial bioinformatics database and analysis resourceMackinac BridgeTheMackinac Bridgeis one of the longest
suspension bridges in the United States and spans the Straits of Mackinac to
connect the Upper and Lower Peninsulas of Michigan.