Class SBMLBridge

java.lang.Object
org.episteme.natural.biology.loaders.sbml.SBMLBridge

public class SBMLBridge extends Object
Bridge for converting SBML DTOs to core Episteme domain objects.

This bridge provides systematic conversion from SBML-parsed data transfer objects to the core Episteme architecture, enabling deep integration with the library's domain models for molecules, species, reactions, and populations.

Usage Example

SBMLReader reader = new SBMLReader();
SBMLModel sbmlModel = reader.read(new File("model.sbml"));

// Convert to core Episteme structures
SBMLBridge bridge = new SBMLBridge();
List<Molecule> molecules = bridge.toMolecules(sbmlModel);
List<ChemicalReaction> reactions = bridge.toReactions(sbmlModel);
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • SBMLBridge

      public SBMLBridge()
  • Method Details

    • toMolecules

      public List<Molecule> toMolecules(SBMLModel model)
      Converts SBML species (metabolites) to Episteme Molecule objects.

      SBML species represent chemical entities in a systems biology model. This method maps them to the core chemistry domain.

      Parameters:
      model - the parsed SBML model
      Returns:
      list of Molecule objects representing the metabolites
    • convertToMolecule

      public Molecule convertToMolecule(SBMLSpecies sbmlSpecies)
      Converts a single SBML species to a Episteme Molecule.
      Parameters:
      sbmlSpecies - the SBML species DTO
      Returns:
      a Molecule, or null if conversion fails
    • toReactions

      public List<BioChemicalReaction> toReactions(SBMLModel model)
      Converts SBML reactions to Episteme BioChemicalReaction objects.

      This bridges the gap between SBML reaction definitions and the core chemistry/biology reaction framework.

      Parameters:
      model - the parsed SBML model
      Returns:
      list of BioChemicalReaction objects
    • convertToReaction

      public BioChemicalReaction convertToReaction(SBMLReaction sbmlReaction, Map<String,Molecule> moleculeMap)
      Converts a single SBML reaction to a Episteme BioChemicalReaction.
      Parameters:
      sbmlReaction - the SBML reaction DTO
      moleculeMap - lookup map for species ID to Molecule
      Returns:
      a BioChemicalReaction, or null if conversion fails
    • getCompartmentMoleculeMap

      public Map<String, List<Molecule>> getCompartmentMoleculeMap(SBMLModel model)
      Creates a compartment-to-species mapping for spatial modeling.
      Parameters:
      model - the parsed SBML model
      Returns:
      map of compartment ID to list of Species in that compartment
    • getGeneProductAssociations

      public Map<String, List<String>> getGeneProductAssociations(SBMLModel model)
      Extracts gene-protein-reaction associations from FBC extension.
      Parameters:
      model - the parsed SBML model with FBC data
      Returns:
      map of reaction ID to gene product associations