Class BiGGReactionsAnnotator

All Implemented Interfaces:
IAnnotateSBases<org.sbml.jsbml.Reaction>, IReportDiffs, IReportStatus

public class BiGGReactionsAnnotator extends BiGGCVTermAnnotator<org.sbml.jsbml.Reaction> implements IAnnotateSBases<org.sbml.jsbml.Reaction>
This class provides functionality to annotate a reaction in an SBML model using BiGG database identifiers. It extends the BiGGCVTermAnnotator class, allowing it to manage controlled vocabulary (CV) terms associated with the reaction. The class handles various aspects of reaction annotation including setting the reaction's name, SBO term, and additional annotations. It also processes gene reaction rules and subsystem information associated with the reaction.
  • Constructor Details

  • Method Details

    • annotate

      public void annotate(List<org.sbml.jsbml.Reaction> reactions) throws SQLException
      Delegates the annotation process for each reaction in the given SBML model. This method iterates over all reactions in the model, updates the progress display, and invokes the annotation for each reaction.
      Specified by:
      annotate in interface IAnnotateSBases<org.sbml.jsbml.Reaction>
      Throws:
      SQLException
    • annotate

      public void annotate(org.sbml.jsbml.Reaction reaction) throws SQLException
      Annotates a reaction by setting its name, SBO term, and additional annotations. It also processes gene reaction rules and subsystem information associated with the reaction. This method retrieves a BiGG ID for the reaction, either from the reaction's ID directly or through associated annotations. If a valid BiGG ID is found, it proceeds with the annotation and parsing processes.
      Specified by:
      annotate in interface IAnnotateSBases<org.sbml.jsbml.Reaction>
      Throws:
      SQLException
    • findBiGGId

      public BiGGId findBiGGId(org.sbml.jsbml.Reaction reaction) throws SQLException
      This method checks if the ID of the reaction is a valid BiGG ID and attempts to retrieve a corresponding BiGG ID based on existing annotations. It first checks if the reaction ID matches the expected BiGG ID format and verifies its existence in the database. If the ID does not match or is not found, it then attempts to extract a BiGG ID from the reaction's annotations. This involves parsing the CVTerms associated with the reaction, extracting URLs, validating them, and then querying the BiGG database for corresponding reaction IDs that match the reaction's compartment.
      Specified by:
      findBiGGId in class BiGGCVTermAnnotator<org.sbml.jsbml.Reaction>
      Returns:
      An Optional containing the BiGG ID if found or created successfully, otherwise Optional.empty()
      Throws:
      SQLException
    • setName

      public void setName(org.sbml.jsbml.Reaction reaction, BiGGId biggId) throws SQLException
      Sets the name of the reaction based on the provided BiGGId. It retrieves the reaction name using the abbreviation from the BiGGId, polishes the name, and updates the reaction's name if the new name is different from the current name.
      Parameters:
      biggId - The BiGGId object containing the abbreviation used to fetch and potentially update the reaction's name.
      Throws:
      SQLException
    • setSBOTerm

      public void setSBOTerm(org.sbml.jsbml.Reaction reaction, BiGGId biggId) throws SQLException
      Sets the SBO term for a reaction based on the given BiGGId. If the reaction does not already have an SBO term set, it determines the appropriate SBO term based on whether the reaction is a pseudoreaction or a generic process. Pseudoreactions are assigned an SBO term of 631, while generic processes are assigned an SBO term of 375 unless the configuration specifies to omit generic terms.
      Parameters:
      biggId - The BiGGId object containing the abbreviation used to check if the reaction is a pseudoreaction.
      Throws:
      SQLException
    • parseGeneReactionRules

      public void parseGeneReactionRules(org.sbml.jsbml.Reaction reaction, BiGGId biggId) throws SQLException
      Parses gene reaction rules for a given reaction based on the BiGG database identifier. This method retrieves gene reaction rules associated with the reaction's abbreviation from the BiGG database and applies gene-protein-reaction (GPR) parsing to the reaction. It considers whether generic terms should be omitted based on the current parameters.
      Parameters:
      biggId - The BiGG database identifier for the reaction, used to fetch and parse gene reaction rules.
      Throws:
      SQLException