Sources of model content
Sources of models.
ASKEM AMR (mira.sources.askenet
)
ASKEM AMR Petri nets (mira.sources.askenet.petrinet
)
This module implements parsing Petri net models defined in https://github.com/DARPA-ASKEM/Model-Representations/tree/main/petrinet.
MIRA TemplateModel representation limitations to keep in mind:
Model version not supported
Model schema not supported
Initials only have a value, cannot be expressions so information on initial condition parameter relationship is lost
- model_from_url(url)[source]
Return a model from a URL
- Parameters:
url (
str
) – The URL to the JSON file.- Return type:
- Returns:
A TemplateModel object.
- model_from_json_file(fname)[source]
Return a model from a JSON file.
- Parameters:
fname (
str
) – The path to the JSON file.- Return type:
- Returns:
A TemplateModel object.
ASKEM AMR Regulatory nets (mira.sources.askenet.regnet
)
Reconstruct ODE semantics (mira.sources.askenet.flux_span
)
This module implements handling flux span model representations that are the result of stratification and map back to original models before stratification.
SBML extraction (mira.sources.sbml
)
- template_model_from_sbml_file(file_path, *, model_id=None, reporter_ids=None)[source]
Extract a MIRA template model from a file containing SBML XML.
- Return type:
- template_model_from_sbml_file_obj(file, *, model_id=None, reporter_ids=None)[source]
Extract a MIRA template model from a file object containing SBML XML.
- Return type:
- template_model_from_sbml_string(s, *, model_id=None, reporter_ids=None)[source]
Extract a MIRA template model from a string representing SBML XML.
- Return type:
BioModels client (mira.sources.biomodels
)
The BioModels database lists several high quality models at https://www.ebi.ac.uk/biomodels/covid-19.
- NON_COVID_EPI_MODELS = {'BIOMD0000000249', 'BIOMD0000000294', 'BIOMD0000000715', 'BIOMD0000000716', 'BIOMD0000000717', 'BIOMD0000000726', 'BIOMD0000000922', 'BIOMD0000000949', 'BIOMD0000000950', 'BIOMD0000001045', 'MODEL1008060000', 'MODEL1008060002', 'MODEL1805220001', 'MODEL1805230001', 'MODEL1808280006', 'MODEL1808280011', 'MODEL2212310001'}
Additional model identifiers for epidemiology models that do not appear in the BioModels curated list of COVID-19 models
- MODEL_TO_PUBMED = {'BIOMD0000000716': '30839942', 'BIOMD0000000717': '30839942'}
Annotation of missing pubmeds to model ids
- query_biomodels(query='submitter_keywords:COVID-19', limit=30)[source]
Query and paginate over results from the BioModels API.
- get_sbml_model(model_id)[source]
Return the SBML string content for a BioModels model from the web.
Bilayer extraction (mira.sources.bilayer
)
This module implements an input processor for bilayer representations of models based on mass-action kinetics.
- template_model_from_bilayer_file(fname)[source]
Return a TemplateModel by processing a bilayer JSON file.
- Parameters:
fname (str) – The path to a bilayer JSON file.
- Return type:
- Returns:
A TemplateModel extracted from the bilayer.