Package semanticSBML :: Module merge_logic :: Class BioRelations :: Class Local
[hide private]
[frames] | no frames]

Class Local

source code

Instance Methods [hide private]
 
__init__(self, merger=None) source code
 
setNewId(self, element, merge_model)
set a unique id for an element, if id is aready unique, leave it, if not set a new one
source code
[str]
getMathElementNames(self, mathobj)
get a list of stings that are identifiers of sbml elements used in the inserted math obj this is a recursive function
source code
 
updateMathElementIDs(self, mathobj, merge_model, create_copy=True)
update all IDs in mathematical expressions with IDs of merged elements if the old element is merged
source code
(OriginElement,OriginElement)
chooseBestTuple(self, el1, el2)
reorder elements so that adding the second element to the tuple of the first gives a better result than adding the first element to the tuple of the second
source code
 
compareElements(self, el1, el2)
compare the annotations of two elements and return a similarity score
source code
 
compareLocation(self, el1, el2) source code
bool
isAnnotationEqual(self, an1, an2, type)
return if 2 annotations can be considered equal
source code
 
getScoreMatrix(self, filename)
TODO triangular to square matrix
source code
 
updateId(self, libsbml_element, oldId, newId) source code
 
_updateMathPointers(self, math, oldId, newId) source code
 
_updateLocationPointers(self, libsbml_element, oldId, newId) source code
 
_updateReactionPointers(self, libsbml_element, oldId, newId) source code
Method Details [hide private]

setNewId(self, element, merge_model)

source code 

set a unique id for an element, if id is aready unique, leave it, if not set a new one

Parameters:
  • element (MergedElement | OriginElement | libsmbl.(Species|...)) - merge(d) element or libsmbl element

getMathElementNames(self, mathobj)

source code 

get a list of stings that are identifiers of sbml elements used in the inserted math obj this is a recursive function

Parameters:
  • mathobj (libSBML.math)
Returns: [str]
list of identifier strings

chooseBestTuple(self, el1, el2)

source code 

reorder elements so that adding the second element to the tuple of the first gives a better result than adding the first element to the tuple of the second

Parameters:
Returns: (OriginElement,OriginElement)
reorder list of the input

compareElements(self, el1, el2)

source code 

compare the annotations of two elements and return a similarity score

Parameters:
  • el1 (libSBML base element or OriginElement) - element containing annotations
  • el2 (libSBML base element or OriginElement) - element containing annotations

isAnnotationEqual(self, an1, an2, type)

source code 

return if 2 annotations can be considered equal

Parameters:
  • an1 (Annotation)
  • an2 (Annotation)
Returns: bool