Sbml

convertSBMLID(str, toSBML)[source]

Converts the given str to a valid SBML ID

USAGE:

convertedstr = convertSBMLID (str, toSBML)

INPUTS:

str – The string to convert

OPTIONAL INPUTS:

toSBML – Whether to convert to SBML format (or undo a conversion) (default true, i.e. convert to SBML)

OUTPUT:

convertedstr – The converted string

getBioQualifiers()[source]

Get a list of possible bioqualifiers

USAGE:

[bioQualifiers, standardQualifiers] = 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]

Extracts database and corresponding id from a resource string in an SBML

USAGE:

[databases, ids, qualifiers] = getDataBases (Ressources, qualifier)

INPUTS:
  • Ressources – The resource string(s) as a cell array

  • qualifier – The bio-qualifier of the resource

OUTPUTS:
  • databases – The databases of the resources

  • ids – The identifiers of the resource strings

  • qualifiers – 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, mergeAnnotations)[source]

Builds the annotation string for an SBML entity from the fields in the model

USAGE:

[annotationString, notes] = makeSBMLAnnotationString (model, id, fieldentries, position, mergeAnnotations)

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 qualifiers to annotate for the field.

  • position – the position in the model to extract the data.

OPTIONAL INPUTS:

mergeAnnotations – If multiple fields are given, merge the fields and only produce one annotation.

OUTPUT:
  • 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]

Maps annotations in bioql/MIRIAM annotation from SBML to model fields.

USAGE:

mappedFields = mapAnnotationsToFields (model, databases, identifiers, relations, field, relationSelection, inverseRelationSelection)

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 chosen 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]

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, struct array with fields:

  • .resources - cell array of resource URIs/URNs for the term

  • .qualifier - the bio-qualifier name for the term

OUTPUT:
  • databases – the databases stored in the resources of the CVTerms.

  • identifiers – the identifiers annotated for the databases.

  • relations – the bio-qualifier relation encoded in the CVTerms.