SBMLImporter

class SBMLImporter

This class allows importing SBML models and converting them into SemSim Models, which contain semantic information about the original SBML model. Most of the functions documented for this class are protected methods used to implement internal logic. Usage of this class is as follows:

libsbml::SBMLDocument* d = ...;
// import the SBML document
semsim::SBMLImporter importer(d);
// get the libSemSim wrapper for the SBML model
const semsim::SBMLModel& model = importer.getSBMLModel();
// do something with the semsim::SBMLModel

Public Functions

semsim::SBMLImporter::SBMLImporter(LIBSBML_CPP_NAMESPACE_QUALIFIER SBMLDocument * d)

Construct a libSemSim SBMLModel from an SBML document.

Parameters
  • d: The input SBML document.

SBMLModel &getSBMLModel()

Return the SBMLModel converted from this document.

const SBMLModel &getSBMLModel() const

Return the SBMLModel converted from this document.

Protected Functions

AnnotationPtr semsim::SBMLImporter::extractAnnotation(LIBSBML_CPP_NAMESPACE_QUALIFIER SBase * s)

Extract the annotation for any SBML element.

AnnotationPtr semsim::SBMLImporter::extractAnnotation(LIBSBML_CPP_NAMESPACE_QUALIFIER Species * s)

Extract the annotation for a species - can be composite using automatic inference logic.

AnnotationPtr semsim::SBMLImporter::extractAnnotation(LIBSBML_CPP_NAMESPACE_QUALIFIER Compartment * c)

Extract the annotation for a compartment.

SingularAnnotation semsim::SBMLImporter::extractSingularAnnotation(LIBSBML_CPP_NAMESPACE_QUALIFIER SBase * s)

Extract a singular annotation from an SBML object. This method is used when a composite annotation cannot be inferred.

Return

A singular annotation containing all bqb:is terms as definitions and all other relations as extraneous terms.

Parameters
  • s: The SBML object

EntityDescriptor semsim::SBMLImporter::extractSpeciesEntityDescriptor(LIBSBML_CPP_NAMESPACE_QUALIFIER Species * s)

Extract an Entity from an SBML object. Uses identical logic to ExtractSingularAnnotation

Return

A singular annotation containing all bqb:is terms as definitions and all other relations as extraneous terms. Extract the EntityDescriptor for an SBML species. The EntityDescriptor may contain the enclosing compartment (if any) referenced with a bqb:occursIn qualifier.

Parameters
  • s: The SBML object

Entity semsim::SBMLImporter::extractSpeciesEntity(LIBSBML_CPP_NAMESPACE_QUALIFIER Species * s)

Try to deduce the Entity from an SBML species. If the species is contained in a compartment, the compartment will be included in the EntityDescriptor using the bqb:occursIn qualifier.

Component* semsim::SBMLImporter::getComponentFor(LIBSBML_CPP_NAMESPACE_QUALIFIER SBase * s)

Return a Object weak pointer for the specified object (if it is in the SBMLModel).

Resource semsim::SBMLImporter::getResourceFor(LIBSBML_CPP_NAMESPACE_QUALIFIER SBase * s)

Return a Resource for the specified object (if it is in the SBMLModel).

CompositeAnnotation semsim::SBMLImporter::extractCompositeAnnotation(LIBSBML_CPP_NAMESPACE_QUALIFIER Species * s)

Extract a composite annotation from an SBML Species. There are several pieces of information libSemSim tries to use to automatically construct composite annotations for SBML species.

  • The PhysicalProperty can sometimes be deduced from substance attributes and units. See SpeciesToPhysicalProperty.

  • If the species is contained in a compartment, the EntityDescriptor can contain a reference to the compartment with a bqb:occursIn qualifier.

    Return

    The automatically inferred composite annotation.

    Parameters
    • s: The input SBML species.

Protected Static Functions

static void semsim::SBMLImporter::populateDefinitionsAndTerms(LIBSBML_CPP_NAMESPACE_QUALIFIER SBase * s, EntityBase & e)

Populate the definitions (URIs specified in CV terms via bqb:is terms) and extraneous terms (URIs specified using any other qualifier) for a SingularAnnotation or Entity in a CompositeAnnotation.

Parameters