merge¶
Merging of SBML models.
The following is a helper function for merging multiple SBML models into a single model.
merge_models
¶
merge_models(
model_paths,
output_dir,
merged_id="merged",
flatten=True,
validate=True,
validate_input=True,
validation_options=None,
sbml_level=3,
sbml_version=1,
)
Merge SBML models.
Merges SBML models given in model_paths in the output_dir.
Models are provided as dictionary
{
'model1_id': model1_path,
'model2_id': model2_path,
...
}
The model ids are used as ids for the ExternalModelDefinitions.
Relative paths are set in the merged models.
The created model is either in SBML L3V1 (default) or SBML L3V2.
:param model_paths: absolute paths to models :param output_dir: output directory for merged model :param merged_id: model id of the merged model :param flatten: flattens the merged model :param validate: boolean flag to validate the merged model :param validate_input: boolean flag to validate the input models :param validation_options: ValidationOptions :param sbml_level: SBML Level of the merged model in [3] :param sbml_version: SBML Version of the merged model in [1, 2] :return: SBMLDocument of the merged models