marsi package

Subpackages

Submodules

marsi.bigg_api module

BiGG database API v2

class marsi.bigg_api.DBVersion(version, api_version, last_update)[source]

Bases: object

Version container.

version

str – Database version.

api_version

str – Version of the API used.

last_update

str – Last update timestamp.

marsi.bigg_api.database_version()[source]

Retrieves the current version of BiGG database

marsi.bigg_api.download_model(model_id, file_format='json', save=True, path='.')[source]

Download models from BiGG. You can chose to save the file or to return the JSON data.

Parameters:
  • model_id (str) – A valid id for a model in BiGG.
  • file_format (str) –
    If you want to save the file, you can import the model in the following formats:
    1. json (JSON format)
    2. xml (SBML)
    3. xml.gz (SBML compressed)
    4. mat (MATLAB)
  • save (bool) – If True, writes the model to a file with the model name (the path can be specified).
  • path (str) – Specifies in which folder the model should be written if save is True.
marsi.bigg_api.model_details(model_id)[source]

Summarize the model.

Parameters:model_id (str) – A valid id for a model in BiGG.
marsi.bigg_api.list_models()[source]

Lists all models available in BiGG.

marsi.bigg_api.list_reactions()[source]

List all reactions available in BiGG.

marsi.bigg_api.list_model_reactions(model_id)[source]

List all reactions in a model.

Parameters:model_id (str) – A valid id for a model in BiGG.
marsi.bigg_api.get_reaction(reaction_id)[source]

Retrieve a reaction from BiGG.

Parameters:reaction_id (str) – A valid id for a reaction in BiGG.
marsi.bigg_api.get_model_reaction(model_id, reaction_id)[source]

Retrieve a reaction in the context of a model from BiGG.

Parameters:
  • model_id (str) – A valid id for a model in BiGG.
  • reaction_id (str) – A valid id for a reaction in BiGG.
marsi.bigg_api.list_metabolites()[source]

List all metabolites in BiGG.

marsi.bigg_api.list_model_metabolites(model_id)[source]

List all metabolites in a model.

Parameters:model_id (str) – A valid id for a model in BiGG.
marsi.bigg_api.get_metabolite(metabolite_id)[source]

Retrieve a metabolite from BiGG.

Parameters:metabolite_id (str) – A valid id for a reaction in BiGG.
marsi.bigg_api.get_model_metabolite(model_id, metabolite_id)[source]

Retrieve a metabolite in the context of a model from BiGG.

Parameters:
  • metabolite_id (str) – A valid id for a reaction in BiGG.
  • model_id (str) – A valid id for a model in BiGG.
marsi.bigg_api.list_model_genes(model_id)[source]

List all genes in a model.

Parameters:model_id (str) – A valid id for a model in BiGG.
marsi.bigg_api.get_model_gene(model_id, gene_id)[source]

Retrieve a gene in the context of a model from BiGG.

Parameters:
  • model_id (str) – A valid id for a model in BiGG.
  • gene_id (str) – A valid id for a gene in BiGG.
marsi.bigg_api.search(query, search_type)[source]

Fuzzy search the BiGG database.

Parameters:
  • query (str) – Whatever you are searching for (ids, names, etc…).
  • search_type (str) – Search domain. One of “models”, “genes”, “reactions”, “metabolites”.

marsi.config module

class marsi.config.Level[source]

Bases: object

ERROR = 0
WARNING = 1
INFO = 2
DEBUG = 4

marsi.utils module

marsi.utils.pickle_large(obj, file_path, progress=False)[source]
marsi.utils.unpickle_large(file_path, progress=False)[source]
marsi.utils.frange(start, stop=None, steps=10)[source]

Float range generator.

Generates steps equally separated between start and stop. If stop is None, the values are between 0 and start

Parameters:
  • start (float) – The initial value.
  • stop (float) – The final value.
  • steps (int) – Number of values to generate.
Returns:

A generator that yields float.

Return type:

generator

Module contents