sbmlutils.biomodels
¶
Utilities for downloading biomodel models.
Module Contents¶
Functions¶
|
Download file from url to path. |
|
Download omex for biomodel id. |
|
Download SBML file for biomodel. |
Query the curated biomodels. |
|
|
Download all curated biomodels and create omex files. |
Attributes¶
- sbmlutils.biomodels.download_file(url, path)[source]¶
Download file from url to path.
Raises
HTTPError
, if one occurred.- Parameters:
url (str) –
path (pathlib.Path) –
- Return type:
pathlib.Path
- sbmlutils.biomodels.download_biomodel_omex(biomodel_id, omex_path)[source]¶
Download omex for biomodel id.
This downloads the latest version of the OMEX from biomodels via the rest service.
- Returns:
path to omex
- Parameters:
biomodel_id (str) –
omex_path (pathlib.Path) –
- Return type:
pathlib.Path
Raises
HTTPError
, if one occurred, i.e. if the model does not exist.
- sbmlutils.biomodels.download_biomodel_sbml(biomodel_id, output_dir, output_format='sbml')[source]¶
Download SBML file for biomodel.
Retrieves the archive from biomodels and gets the SBML files from it. Stores the raw SBML files for output_format=’sbml’ or creates an OMEX archive in case of output_format=’omex’.
- Parameters:
output_format (str) – ‘sbml’ or ‘omex’
biomodel_id (str) –
output_dir (pathlib.Path) –
- Returns:
list of location strings
- Return type:
List[str]
Raises
HTTPError
, if one occurred, i.e. if the model does not exist. RaisesValueError
, if invalid format string is provided.
- sbmlutils.biomodels.query_curated_biomodels()[source]¶
Query the curated biomodels.
:return List of biomodel identifiers
- Return type:
List[str]