SBML-utilities¶
- convertSBMLID(str, toSBML)¶
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()¶
Get a list of possible bioqualifiers
- USAGE:
annotationQualifiers = getBioQualifiers()
- OUTPUT:
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)¶
getDataBases extracts database and correspdoning id from a ressource string in an sbml USAGE:
[databases,ids,qualifiers] = getDataBases(Ressource,qualifier)
INPUT:
Ressources: The Ressource String(s) as a cell array qualifier: The bio-qualifier of the ressource
OUTPUT:
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, mergeAnnotations)¶
makeSBMLAnnotationString gives the annotationString for an SBML based on the fields in the model
USAGE:
[annotationString, notes] = makeSBMLAnnotationString(model,id,fieldentries,position)
- INPUT:
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.
- 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)¶
MAPANNOTATIONSTOFIELDS maps annotations in bioql/MIRIAM annotation from SBML to model fields.
USAGE:
mappedFields = mapAnnotationsToFields(model,databases,identifiers,relations,field,relationSelection, exclusiveSelection)
INPUT:
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 INPUT:
- 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)¶
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
OUTPUT:
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.