Mercurial > repos > bimib > cobraxy
comparison COBRAxy/marea.py @ 282:f5635309779a draft
Uploaded
author | francesco_lapi |
---|---|
date | Tue, 13 May 2025 09:01:16 +0000 |
parents | 7f37f9626071 |
children | 2436856c7e51 |
comparison
equal
deleted
inserted
replaced
281:5dd2ab4637aa | 282:f5635309779a |
---|---|
433 | 433 |
434 def styleReactionElements(self, metabMap :ET.ElementTree, reactionId :str, *, mindReactionDir = True) -> None: | 434 def styleReactionElements(self, metabMap :ET.ElementTree, reactionId :str, *, mindReactionDir = True) -> None: |
435 # If We're dealing with RAS data or in general don't care about the direction of the reaction we only style the arrow body | 435 # If We're dealing with RAS data or in general don't care about the direction of the reaction we only style the arrow body |
436 if not mindReactionDir: | 436 if not mindReactionDir: |
437 return self.applyTo(getArrowBodyElementId(reactionId), metabMap, self.toStyleStr()) | 437 return self.applyTo(getArrowBodyElementId(reactionId), metabMap, self.toStyleStr()) |
438 | 438 print('PROVA 1') |
439 # Now we style the arrow head(s): | 439 # Now we style the arrow head(s): |
440 idOpt1, idOpt2 = getArrowHeadElementId(reactionId) | 440 idOpt1, idOpt2 = getArrowHeadElementId(reactionId) |
441 self.applyTo(idOpt1, metabMap, self.toStyleStr(downSizedForTips = True)) | 441 self.applyTo(idOpt1, metabMap, self.toStyleStr(downSizedForTips = True)) |
442 if idOpt2: self.applyTo(idOpt2, metabMap, self.toStyleStr(downSizedForTips = True)) | 442 if idOpt2: self.applyTo(idOpt2, metabMap, self.toStyleStr(downSizedForTips = True)) |
443 | 443 |
497 if math.isnan(pValue) or (isinstance(foldChange, float) and math.isnan(foldChange)): continue | 497 if math.isnan(pValue) or (isinstance(foldChange, float) and math.isnan(foldChange)): continue |
498 | 498 |
499 if isinstance(foldChange, str): foldChange = float(foldChange) | 499 if isinstance(foldChange, str): foldChange = float(foldChange) |
500 if pValue >= ARGS.pValue: # pValue above tresh: dashed arrow | 500 if pValue >= ARGS.pValue: # pValue above tresh: dashed arrow |
501 INSIGNIFICANT_ARROW.styleReactionElements(metabMap, reactionId) | 501 INSIGNIFICANT_ARROW.styleReactionElements(metabMap, reactionId) |
502 print('PROVA 2') | |
502 continue | 503 continue |
503 | 504 |
504 if abs(foldChange) < (ARGS.fChange - 1) / (abs(ARGS.fChange) + 1): | 505 if abs(foldChange) < (ARGS.fChange - 1) / (abs(ARGS.fChange) + 1): |
505 INVALID_ARROW.styleReactionElements(metabMap, reactionId) | 506 INVALID_ARROW.styleReactionElements(metabMap, reactionId) |
506 continue | 507 continue |