Class BiGGReactionsAnnotator
java.lang.Object
de.uni_halle.informatik.biodata.mp.annotation.AbstractAnnotator
de.uni_halle.informatik.biodata.mp.annotation.bigg.AbstractBiGGAnnotator
de.uni_halle.informatik.biodata.mp.annotation.bigg.BiGGCVTermAnnotator<org.sbml.jsbml.Reaction>
de.uni_halle.informatik.biodata.mp.annotation.bigg.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.-
Field Summary
Fields inherited from class de.uni_halle.informatik.biodata.mp.annotation.bigg.AbstractBiGGAnnotator
bigg, biGGAnnotationParameters, registry
-
Constructor Summary
ConstructorDescriptionBiGGReactionsAnnotator
(BiGGDB bigg, BiGGAnnotationParameters biGGAnnotationParameters, SBOParameters sboParameters, Registry registry) BiGGReactionsAnnotator
(BiGGDB bigg, BiGGAnnotationParameters parameters, SBOParameters sboParameters, Registry registry, List<ProgressObserver> observers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Delegates the annotation process for each reaction in the given SBML model.void
annotate
(org.sbml.jsbml.Reaction reaction) Annotates a reaction by setting its name, SBO term, and additional annotations.findBiGGId
(org.sbml.jsbml.Reaction reaction) 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.void
parseGeneReactionRules
(org.sbml.jsbml.Reaction reaction, BiGGId biggId) Parses gene reaction rules for a given reaction based on the BiGG database identifier.void
Sets the name of the reaction based on the provided BiGGId.void
setSBOTerm
(org.sbml.jsbml.Reaction reaction, BiGGId biggId) Sets the SBO term for a reaction based on the given BiGGId.Methods inherited from class de.uni_halle.informatik.biodata.mp.annotation.bigg.AbstractBiGGAnnotator
getBiGGIdFromResources
Methods inherited from class de.uni_halle.informatik.biodata.mp.annotation.AbstractAnnotator
diffReport, getObservers, statusReport
-
Constructor Details
-
BiGGReactionsAnnotator
public BiGGReactionsAnnotator(BiGGDB bigg, BiGGAnnotationParameters biGGAnnotationParameters, SBOParameters sboParameters, Registry registry) -
BiGGReactionsAnnotator
public BiGGReactionsAnnotator(BiGGDB bigg, BiGGAnnotationParameters parameters, SBOParameters sboParameters, Registry registry, List<ProgressObserver> observers)
-
-
Method Details
-
annotate
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 interfaceIAnnotateSBases<org.sbml.jsbml.Reaction>
- Throws:
SQLException
-
annotate
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 interfaceIAnnotateSBases<org.sbml.jsbml.Reaction>
- Throws:
SQLException
-
findBiGGId
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 classBiGGCVTermAnnotator<org.sbml.jsbml.Reaction>
- Returns:
- An
Optional
containing the BiGG ID if found or created successfully, otherwiseOptional.empty()
- Throws:
SQLException
-
setName
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
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
-