SigPath

org.sigpath.task.model
Class TSBMLModelExport

java.lang.Object
  extended by org.sigpath.task.DBTask
      extended by org.sigpath.task.model.TExportModel
          extended by org.sigpath.task.model.TSBMLModelExport
All Implemented Interfaces:
Task

public class TSBMLModelExport
extends TExportModel

This class enables creating an SBML model, constituted currently only by instances of SBMLcompartments, SBMLspecies and SBMLreactions (from elementary and enzymatic reactions). Then uses an instance of SBMLWriter to create the SBML output, or a JSimWriter instance to make a JSim output


Field Summary
protected static int ACCROSS_TWO_COMPARTMENTS
           
protected  String comments
           
protected static int K1
           
protected static int K2
           
protected static int K3
           
protected static int KB
           
protected static int KBKP
           
protected static int KF
           
protected static int KM
           
protected static int KP
           
protected  Model model
           
protected  String modelSpid
           
protected  Vector sbmlCompartments
           
protected  Vector sbmlReactions
           
protected  Vector sbmlSpecies
           
protected  StringBuffer sbOut
           
protected  Unit targetUnit
          target unit for concentrations.
protected static int VMAX
           
protected static int WITHIN_A_COMPARTMENT
           
protected  ExportWriter writer
           
 
Fields inherited from class org.sigpath.task.DBTask
dbManager, embeddedTask, entityManager, errors, ftsm, progressListener, sigpathFactory, unitManager, userManager, xdebug
 
Constructor Summary
TSBMLModelExport(String spid, ExportWriter writer)
           
 
Method Summary
protected  void _execute()
          Goes trough the process of reading compartment, molecules, reactions, enzimatic reaction, converting all these into sbml-like objects, including splitting enzimatic reactions into 2 elementary reactions, and spatializing reaction
protected  boolean aSingleCompartmentInvoved(Vector sbmlspecies)
          checks if the reactions occurs within a single compartment
 void convertParameterValuesToTargetUnit(Vector sbmlEntities)
          converts all parameters of instances of SbmlEntity class found in the parameter Vector
 ComplexImpl createComplexMickaelis(SPDBManager dbm, EnzymaticReaction enzymaticReaction, HashMap cm)
          Creates a Comple representing the Michaelis complex
 void enzymaticReactionTreatment(SPDBManager dbm, Vector molecules, Vector rs, Vector eReactions, Set exReactions)
          for each EnzymaticReaction of the model : splits it into two elementary reactions, add them to a rs vector, and create the corresponding mikaelis complexe.
 String getOutFile()
           
 Vector getSbmlSpecies(Chemical chemical)
          gets all the SBMLSpecies in the sbmlSpecies set corresponding to a given Chemical.
protected  boolean isThereAnIsolatedSpecieAmongThese(Vector sbmlspecies)
          Check for isolated species.
 void setHideDate(boolean hideDate)
          Instruct the model export to output the date or not.
 void setHideDiagramCoordinates(boolean hideDiagramCoordinates)
          Instruct the model export to output the diagram coordinates or not.
 void setIncludeDiagramLayout(boolean includeDiagramLayout)
           
 void setModelSpid(String spid)
           
protected  boolean twoContiguousCompartments(Vector sbmlspecies)
          used to test if a SBMLreaction is consistent in a spatial point of view.
 
Methods inherited from class org.sigpath.task.DBTask
close, delete, execute, getDbManager, getErrors, isEmbeddedTask, isTaskThrewException, reindex, resolve, setDbManager, setEmbeddedTask, setEmbeddedTask, setObtainTransactionsFrom, setProgressListener, setTaskThrewException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KF

protected static final int KF
See Also:
Constant Field Values

KB

protected static final int KB
See Also:
Constant Field Values

KM

protected static final int KM
See Also:
Constant Field Values

VMAX

protected static final int VMAX
See Also:
Constant Field Values

KP

protected static final int KP
See Also:
Constant Field Values

KBKP

protected static final int KBKP
See Also:
Constant Field Values

K1

protected static final int K1
See Also:
Constant Field Values

K2

protected static final int K2
See Also:
Constant Field Values

K3

protected static final int K3
See Also:
Constant Field Values

WITHIN_A_COMPARTMENT

protected static final int WITHIN_A_COMPARTMENT
See Also:
Constant Field Values

ACCROSS_TWO_COMPARTMENTS

protected static final int ACCROSS_TWO_COMPARTMENTS
See Also:
Constant Field Values

targetUnit

protected Unit targetUnit
target unit for concentrations.


sbmlSpecies

protected Vector sbmlSpecies

sbmlCompartments

protected Vector sbmlCompartments

sbmlReactions

protected Vector sbmlReactions

sbOut

protected StringBuffer sbOut

comments

protected String comments

modelSpid

protected String modelSpid

model

protected Model model

writer

protected ExportWriter writer
Constructor Detail

TSBMLModelExport

public TSBMLModelExport(String spid,
                        ExportWriter writer)
Method Detail

setHideDate

public void setHideDate(boolean hideDate)
Instruct the model export to output the date or not. Defautl is to output the date. Setting hideDate to True is useful for junit tests that compare the expected result of the export to an export done at a latter date.

Specified by:
setHideDate in class TExportModel
Parameters:
hideDate - When true, the date will not be included in the model output.

setHideDiagramCoordinates

public void setHideDiagramCoordinates(boolean hideDiagramCoordinates)
Description copied from class: TExportModel
Instruct the model export to output the diagram coordinates or not. Default is to output the diagram coordinates. Setting hideDiagramCoordinates to True is useful for junit tests that compare the expected result of the export to an export done at a later time and on different plaforms. YFiles seem to create different layouts on hyperthreaded machines.

Specified by:
setHideDiagramCoordinates in class TExportModel
Parameters:
hideDiagramCoordinates - When true, the date will not be included in the model output.

getOutFile

public String getOutFile()
Specified by:
getOutFile in class TExportModel

setModelSpid

public void setModelSpid(String spid)
Specified by:
setModelSpid in class TExportModel

_execute

protected void _execute()
                 throws SigPathDatabaseException
Goes trough the process of reading compartment, molecules, reactions, enzimatic reaction, converting all these into sbml-like objects, including splitting enzimatic reactions into 2 elementary reactions, and spatializing reaction

Specified by:
_execute in class DBTask
Throws:
SigPathDatabaseException

isThereAnIsolatedSpecieAmongThese

protected boolean isThereAnIsolatedSpecieAmongThese(Vector sbmlspecies)
Check for isolated species. ********* Maybe not usefull anymore********************************************* checks if among a set of SBMLSpecies, one is isolated, i.e. in a compartment wich is not in contact with any of the compartments where the other species involved in the reaction are found this method may also be done building the symetrical matrix of contacts between species which may be required for large "species" vectors, since more optimal I guess

Parameters:
sbmlspecies -
Returns:
boolean

twoContiguousCompartments

protected boolean twoContiguousCompartments(Vector sbmlspecies)
used to test if a SBMLreaction is consistent in a spatial point of view. Consistent means : takes place in a single compartment, or only involves two adjacent compartments

Parameters:
sbmlspecies -
Returns:
returns the number of compartments referenced by a Vector of species

aSingleCompartmentInvoved

protected boolean aSingleCompartmentInvoved(Vector sbmlspecies)
checks if the reactions occurs within a single compartment

Parameters:
sbmlspecies -
Returns:

enzymaticReactionTreatment

public void enzymaticReactionTreatment(SPDBManager dbm,
                                       Vector molecules,
                                       Vector rs,
                                       Vector eReactions,
                                       Set exReactions)
                                throws SigPathDatabaseException
for each EnzymaticReaction of the model : splits it into two elementary reactions, add them to a rs vector, and create the corresponding mikaelis complexe. Mikaelis complexes are also if needed added to the database splits at the same time the Excluded reactions to make two excluded ones Scyto -> Pnuc gives Ecyto+Scyto->EScyto and EScyto->Pnuc+Enuc

Parameters:
dbm -
molecules -
rs - Vector of Reaction
Throws:
SigPathDatabaseException

createComplexMickaelis

public ComplexImpl createComplexMickaelis(SPDBManager dbm,
                                          EnzymaticReaction enzymaticReaction,
                                          HashMap cm)
Creates a Comple representing the Michaelis complex

Parameters:
dbm -
enzymaticReaction -
cm - HashMap with all the already created michaelis complex complexes
Returns:

getSbmlSpecies

public Vector getSbmlSpecies(Chemical chemical)
gets all the SBMLSpecies in the sbmlSpecies set corresponding to a given Chemical.

Parameters:
chemical -
Returns:
Vector of SBMLSpecies

convertParameterValuesToTargetUnit

public void convertParameterValuesToTargetUnit(Vector sbmlEntities)
                                        throws SigPathDatabaseException
converts all parameters of instances of SbmlEntity class found in the parameter Vector

Parameters:
sbmlEntities -
Throws:
SigPathDatabaseException

setIncludeDiagramLayout

public void setIncludeDiagramLayout(boolean includeDiagramLayout)

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.