Skip to content

export .mat to .xml #2

@zoey-rw

Description

@zoey-rw

Hi, thanks for publishing this excellent collection of consensus models. I'm trying to load the soil models into Python, after separating the merged file into separate mat files using this snippet:

load('data/models/consensus/Soil_consensus_models_biomass')
experiments = {'Schlaeppi','Bulgarelli'};
i = 1 
% write single .mat files for every model in a subdirectory
tmpModelDir = fullfile(modelDir, 'tmp_models', [experiments{i}, tmp_spec]);
[s, fileList] = createModelDir(merged_models, tmpModelDir);

However, I cannot figure out how to convert the separated .mat files to .xml. For example, I tried the following for Soil522.mat:

  • from Matlab/cobra, readCbModel returns Error using readCbModel (line 112) Cannot process this file type when the .mat file is selected interactively
  • from python: cobra.io.load_matlab_model returns ValueError: Names cannot contain whitespace characters. "n 1-4-alpha-D-Glucan[c]" contains whitespace character " ".
  • from R (to remove whitespace from names): R.matlab::writeMat freezes without writing

Do you have any code recommendations for exporting the files as SBML for use in Python (ideally with the MetaNetX namespace)? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions