SBML-utilities¶
-
convertSBMLID
(str, toSBML)[source]¶ CONVERTSBMLID converts the given str to a valid SBML ID Usage
convertedstr = convertSBMLID(str,toSBML)Input
- str – The String to convert
Optional input
- toSBML – Whether to convert to SBML format (or undo a conversion) (default true, ie convert to SBML)
Output
- convertedstr – The converted String.
-
getBioQualifiers
()[source]¶ Get a list of possible bioqualifiers
Usage
annotationQualifiers = getBioQualifiers()Outputs
- bioQualifiers – A cell array of bioqualifier strings in descending order.
- standardQualifiers – A n x 2 cell array with the first column representing the standard identifiers and the second column representing the alternative name.
-
getDataBases
(Ressources, qualifier)[source]¶ getDataBases extracts database and correspdoning id from a ressource string in an sbml Usage
[databases,ids,qualifiers] = getDataBases(Ressource,qualifier)Inputs
- Ressources – The Ressource String(s) as a cell array
- qualifier – The bio-qualifier of the ressource
Outputs
- databases – The databases of the ressources
- ids – The identifiers of the ressource strings
- qualifier – The bio-qualifiers associated (the same as the input)
Note
Currently two different schemes are accepted: urn:miriam:DatabaeID:EntryID https://identifiers.org/databaseid/EntryID The correctness of the entries is NOT checked!
-
makeSBMLAnnotationString
(model, id, fieldentries, position)[source]¶ makeSBMLAnnotationString gives the annotationString for an SBML based on the fields in the model
Usage
[annotationString, notes] = makeSBMLAnnotationString(model,id,fieldentries,position)Inputs
- model – the model to extract the data
- id – the ID of the entity
- fieldentries – either a char indicating the field (prot,met,rxn,comp,gene), or a cell array with X{:,1} being field IDs and X{:,2} being bioql qualiiers to annotate for the field.
- position – the position in the model to extract the data.
Outputs
- annotationString – The annotation String to be put into the SBML.
- notes – A 2*x cell array of fields which did not contain valid identifiers (according to the pattern check.
-
mapAnnotationsToFields
(model, databases, identifiers, relations, field, relationSelection, inverseRelationSelection)[source]¶ MAPANNOTATIONSTOFIELDS maps annotations in bioql/MIRIAM annotation from SBML to model fields.
Usage
mappedFields = mapAnnotationsToFields(model,databases,identifiers,relations,field,relationSelection, exclusiveSelection)Inputs
- model – the COBRA model to annotate
- databases – a cell array of cell arrays containing databases
- identifiers – a cell array of cell arrays containing the identifiers associated with the databases above
- relations – a cell array of cell arrays containing the bioql relations associated with the databases above
- field – the model field (met/gene/rxn/protein/comp etc) to annotate. Note that there is an s missing here.
Optional inputs
- relationSelection – whether only a specific relation is choosen and all others are ignored (default {})
- inverseRelationSelection – whether the relation specified by relationSelection is inverted (i.e. all other fields are used (default true))
Output
- mappedFields – a struct with fields for each encountered annotation database (Known databases like e.g. HMDB will be mapped to their corresponding field metHMDBID, while unknown fields will be mapped to: [field relation convertSBMLID(database)]
-
parseCVTerms
(CVTerms)[source]¶ parseCVTerms extracts the annotations deposited in cvterms in an SBML struct
Usage
[databases, identifiers, relations] = parseCVTerms(CVTerms)Input
- CVTerms – the CVTerms field of an SBML model field
Outputs
- databases – the databases stored in the ressources of the CVTerms.
- identifiers – The identifiers annotated for the databases.
- relations – The bio-qualifier relation encoded in the CVTerms.