biosimulators_utils.biosimulations package

Submodules

biosimulators_utils.biosimulations.data_model module

Data model for BioSimulations metadata

Author

Jonathan Karr <karr@mssm.edu>

Date

2020-12-06

Copyright

2020, Center for Reproducible Biomedical Modeling

License

MIT

class biosimulators_utils.biosimulations.data_model.Citation(title=None, authors=None, journal=None, volume=None, issue=None, pages=None, year=None, identifiers=None)[source]

Bases: object

A citation

title[source]

title

Type

str

authors[source]

authors

Type

str

journal[source]

journal

Type

str

volume[source]

volume

Type

str

issue[source]

issue

Type

str

pages[source]

pages

Type

str

year[source]

year

Type

int

identifiers[source]

identifiers

Type

list of Identifier

is_equal(other)[source]

Determine if citations are equal

Parameters

other (Citation) – another citation

Returns

True, if two citations are equal

Return type

bool

to_tuple()[source]

Get a tuple representation

Returns

tuple representation

Return type

tuple of str

class biosimulators_utils.biosimulations.data_model.ExternalReferences(identifiers=None, citations=None)[source]

Bases: object

Identifiers and citations of an object

identifiers[source]

identifiers

Type

list of Identifier

citations[source]

citations

Type

list of Citation

is_equal(other)[source]

Determine if collections of external references are equal

Parameters

other (ExternalReferences) – another collection of external referencse

Returns

True, if two collections of external references are equal

Return type

bool

to_tuple()[source]

Get a tuple representation

Returns

tuple representation

Return type

tuple of str

class biosimulators_utils.biosimulations.data_model.Metadata(description=None, tags=None, authors=None, references=None, license=None, created=None, updated=None)[source]

Bases: object

Metadata about an object

description[source]

description

Type

str

tags[source]

tags

Type

list of str

authors[source]

authors

Type

list of Person

references[source]

identifiers and citations

Type

ExternalReferences

license[source]

license

Type

OntologyTerm

created[source]

created date-time

Type

datetime.datetime

updated[source]

updated date-time

Type

datetime.datetime

is_equal(other)[source]

Determine if metadata are equal

Parameters

other (Metadata) – another metadata

Returns

True, if two metadata are equal

Return type

bool

to_tuple()[source]

Get a tuple representation

Returns

tuple representation

Return type

tuple of str

biosimulators_utils.biosimulations.utils module

Utility methods for working with BioSimulations and runBioSimulations

Author

Jonathan Karr <karr@mssm.edu>

Date

2021-01-30

Copyright

2021, Center for Reproducible Biomedical Modeling

License

MIT

biosimulators_utils.biosimulations.utils.submit_project_to_runbiosimulations(name, filename_or_url, simulator, simulator_version='latest', cpus=1, memory=8, max_time=20, env_vars=None, email=None, public=False, config=None)[source]

Submit a simulation project (COMBINE/OMEX archive) to runBioSimulations and, optionally, BioSimulations

Parameters
  • name (str) – name for the simulation run

  • filename_or_url (str) – path or URL to COMBINE/OMEX archive

  • simulator (str) – BioSimulators id for simulator

  • simulator_version (str, optional) – simulator version

  • cpus (int, optional) – CPUs

  • memory (float, optional) – maximum memory in GB

  • max_time (float, optional) – maximum execution time in minutes

  • env_vars (list of dict, optional) – environment variables to execute the COMBINE/OMEX archive. Each element should have two string-valued keys key and value

  • email (str, optional) – email to receive a notification upon completion of the simulation run

  • public (bool, optional) – whether to publish the simulation run to BioSimulations

  • config (Config, optional) – configuration

Returns

runBioSimulations id

Return type

str

biosimulators_utils.biosimulations.utils.validate_biosimulations_api_response(response, failure_introductory_message)[source]

Validate a response from one of BioSimulation’s APIs.

Parameters
  • response (requests.models.Response) – API response

  • failure_introductory_message (str) – introductory message for failures

Raises

requests.RequestException