Input and output

File I/O and serialization

COBREXA.save_h5_modelMethod
save_h5_model(model::MetabolicModel, file_name::String) -> HDF5Model


Converts and writes a metabolic model to disk in the HDF5 format.

Additionally returns an (uncached) HDF5Model that represents the contents of the saved file. Because all HDF5-based models need to be backed by disk storage, writing the data to disk (using this function) is the only way to make new HDF5 models.

source
COBREXA.load_modelMethod
load_model(file_name::String; extension) -> Any


Generic function for loading models that chooses a specific loader function based on the extension argument (e.g., ".xml" chooses loading of the SBML model format), or throws an error. By default the extension from file_name is used.

Currently, these model types are supported:

source
COBREXA.load_modelMethod
load_model(type::Type{T<:MetabolicModel}, file_name::String; extension) -> MetabolicModel


Helper function that loads the model using load_model and returns it converted to type.

Example:

load_model(CoreModel, "mySBMLModel.xml")
source
COBREXA.save_modelMethod
save_model(model::MetabolicModel, file_name::String; extension) -> Maybe{HDF5Model}


Generic function for saving models that chooses a specific writer function from the extension argument (such as ".xml" for SBML format), or throws an error. By default the extension from file_name is used.

Currently, these model types are supported:

source
COBREXA.load_json_modelMethod
load_json_model(filename::String) -> JSONModel


Load and return a JSON-formatted model that is stored in file_name.

source
COBREXA.save_json_modelMethod
save_json_model(model::MetabolicModel, file_name::String)


Save a JSONModel in model to a JSON file file_name.

In case the model is not JSONModel, it will be converted automatically.

source
COBREXA.load_mat_modelMethod
load_mat_model(file_name::String) -> MATModel


Load and return a MATLAB file file_name that contains a COBRA-compatible model.

source
COBREXA.save_mat_modelMethod
save_mat_model(model::MetabolicModel, file_path::String; model_name)


Save a MATModel in model to a MATLAB file file_name in a format compatible with other MATLAB-based COBRA software.

In case the model is not MATModel, it will be converted automatically.

model_name is the identifier name for the whole model written to the MATLAB file; defaults to just "model".

source

Pretty printing

Base.showMethod
show(io::IO, _::MIME{Symbol("text/plain")}, m::MetabolicModel)


Pretty printing of everything metabolic-modelish.

source