biosimulations_modeldb package

Submodules

biosimulations_modeldb.config module

biosimulations_modeldb.config.get_config(source_api_endpoint='http://modeldb.science/api/v1', source_projects_git_repository_organization='https://github.com/ModelDBRepository', base_dirname=None, source_dirname=None, sessions_dirname=None, final_dirname=None, curators_filename=None, issues_filename=None, status_filename=None, project_ids=None, first_project=0, max_projects=None, update_project_sources=False, update_combine_archives=False, update_simulations=False, update_simulation_runs=False, simulate_projects=True, publish_projects=True, entrez_delay=5.0, max_number_of_simulation_steps=1000, bucket_endpoint=None, bucket_name=None, bucket_access_key_id=None, bucket_secret_access_key=None, biosimulations_api_client_id=None, biosimulations_api_client_secret=None, dry_run=False)[source]

Get a configuration

Parameters
  • (obj (status_filename) – str, optional): endpoint for retrieving metadata about ModelDB projects

  • (objstr, optional): organization for git repositories for ModelDB projects

  • base_dirname (str, optional) – base directory for data

  • (objstr, optional): directory where source projects, metabolic flux maps, and thumbnails should be stored

  • (objstr, optional): directory where cached HTTP sessions should be stored

  • (objstr, optional): directory where created SED-ML, metadata, and COMBINE/OMEX archives should be stored

  • (objstr, optional): path which describes the people who helped curator the repository

  • (objstr, optional): path to issues which prevent some projects from being imported

  • (objstr, optional): path to save the import status of each project

  • project_ids (list of str, optional) – ids of projects to import

  • first_project (int, optional) – iteration through projects at which to begin importing

  • max_projects (int, optional) – maximum number of projects to download, convert, execute, and submit; used for testing

  • update_project_sources (bool, optional) – whether to update the source files for the projects; used for testing

  • update_combine_archives (bool, optional) – whether to update COMBINE archives even if they already exist; used for testing

  • update_simulations (bool, optional) – whether to re-run COMBINE archives even if they have already been run; used for testing

  • update_simulation_runs (bool, optional) – whether to update projects even if they have already been imported; used for testing

  • simulate_projects (bool, optional) – whether to simulate projects; used for testing

  • publish_projects (bool, optional) – whether to pushlish projects; used for testing

  • entrez_delay (float, optional) – delay in between Entrez queries

  • max_number_of_simulation_steps (int, optional) – maximum number of simulation steps for generated SED-ML simulations

  • bucket_endpoint (str, optional) – endpoint for storage bucket

  • bucket_name (str, optional) – name of storage bucket

  • bucket_access_key_id (str, optional) – key id for storage bucket

  • bucket_secret_access_key (str, optional) – access key for storage bucket

  • biosimulations_api_client_id (str, optional) – id for client to the BioSimulations API

  • biosimulations_api_client_secret (str, optional) – secret for client to the BioSimulations API

  • dry_run (bool, optional) – whether to submit projects to BioSimulations or not; used for testing

Returns

dict: configuration

Return type

obj

biosimulations_modeldb.core module

biosimulations_modeldb.core.import_projects(config)[source]

Download the source database, convert into COMBINE/OMEX archives, simulate the archives, and submit them to BioSimulations

Parameters

config (dict) – configuration

biosimulations_modeldb.utils module

biosimulations_modeldb.utils.case_insensitive_glob(pattern, **kwargs)[source]

Glob without case sensitivity

Parameters
  • pattern (str) – glob pattern

  • **kwargs

Returns

path of files that match the glob pattern

Return type

list of str

biosimulations_modeldb.utils.get_file_extension_combine_uri_map()[source]

Get a map from file extensions to URIs for use with manifests of COMBINE/OMEX archives

Parameters

config (Config, optional) – configuration

Returns

which maps extensions to lists of associated URIs

Return type

dict

biosimulations_modeldb.utils.get_images_for_project(dirname)[source]

Get the images for a project

Parameters

dirname (str) – directory for project

Returns

paths to the images

Return type

list of str

biosimulations_modeldb.utils.get_readme(filename, project_id, project_dirname)[source]

Read the content of a README file

Parameters
  • filename (str) – path to README file

  • project_id (str) – project id

  • project_dirname (str) – project directory

Returns

Markdown-formatted content of the file

Return type

str