Esempio n. 1
0
 def __gt__(self, other):
     if self.id == other.id:
         if isinstance(other, ReactionKnockoutTarget):
             raise IncompatibleTargets(self, other)
         if isinstance(other, ReactionModulationTarget):
             return False
         if isinstance(other, ReactionKnockinTarget):
             return True
         else:
             raise IncompatibleTargets(self, other)
     else:
         return self.id > other.id
Esempio n. 2
0
 def __gt__(self, other):
     if self.id == other.id:
         if isinstance(other, ReactionModulationTarget):
             if other._value == 0:
                 return True
             else:
                 raise IncompatibleTargets(self, other)
         elif isinstance(other, ReactionCofactorSwapTarget):
             raise IncompatibleTargets(self, other)
         else:
             raise IncompatibleTargets(self, other)
     else:
         return self.id > other.id
Esempio n. 3
0
 def __gt__(self, other):
     if self.id == other.id:
         if isinstance(other, ReactionKnockinTarget):
             if self._value == 0:
                 raise IncompatibleTargets(self, other)
             else:
                 return True
         elif isinstance(other, ReactionCofactorSwapTarget):
             return True
         elif isinstance(other,
                         ReactionModulationTarget) and not isinstance(
                             other, ReactionKnockoutTarget):
             return self.fold_change > other.fold_change
         else:
             raise IncompatibleTargets(self, other)
     else:
         return self.id > other.id
Esempio n. 4
0
 def __gt__(self, other):
     if self.id == other.id:
         if isinstance(other, ReactionKnockoutTarget):
             raise IncompatibleTargets(self, other)
         elif isinstance(other, ReactionModulationTarget):
             if other._value == 0:
                 raise IncompatibleTargets(self, other)
             else:
                 return False
         elif isinstance(other, ReactionKnockinTarget):
             return False
         elif isinstance(other, ReactionCofactorSwapTarget):
             return False
         elif isinstance(other, EnsembleTarget):
             return not other > self
         else:
             raise IncompatibleTargets(self, other)
     else:
         return self.id > other.id
Esempio n. 5
0
 def __gt__(self, other):
     if self.id == other.id:
         if isinstance(other, GeneModulationTarget) and not isinstance(
                 other, GeneKnockoutTarget):
             return self.fold_change > other.fold_change
         elif isinstance(other, GeneKnockoutTarget):
             return False
         else:
             raise IncompatibleTargets(self, other)
     else:
         return self.id > other.id