comparison COBRAxy/flux_to_map.py @ 194:8b7d2e6b4995 draft

Uploaded
author francesco_lapi
date Thu, 21 Nov 2024 09:18:19 +0000
parents a0b00e4cc6a2
children 1306b3543e57
comparison
equal deleted inserted replaced
193:bd4e756de8bb 194:8b7d2e6b4995
398 if getElementById(reactionId, metabMap).map(lambda el : styleMapElement(el, styleStr)).isErr: 398 if getElementById(reactionId, metabMap).map(lambda el : styleMapElement(el, styleStr)).isErr:
399 ERRORS.append(reactionId) 399 ERRORS.append(reactionId)
400 400
401 def styleReactionElements(self, metabMap :ET.ElementTree, reactionId :str, *, mindReactionDir = True) -> None: 401 def styleReactionElements(self, metabMap :ET.ElementTree, reactionId :str, *, mindReactionDir = True) -> None:
402 if not mindReactionDir: 402 if not mindReactionDir:
403 if 'r1050' in reactionId:
404 print(reactionId)
405 print(self.toStyleStr())
406 print(getArrowBodyElementId(reactionId))
407 print(getElementById(getArrowBodyElementId(reactionId), metabMap))
408
409 for element in metabMap.iter():
410 # Ottieni l'attributo 'id' dell'elemento (se esiste)
411 element_id = element.get('id')
412 if element_id and 'r1050' in element_id:
413 print(element_id)
414 print(True)
415
416 return self.applyTo(getArrowBodyElementId(reactionId), metabMap, f";stroke:#a020f0;stroke-width:2;stroke-dasharray:5,5")
417 return self.applyTo(getArrowBodyElementId(reactionId), metabMap, self.toStyleStr()) 403 return self.applyTo(getArrowBodyElementId(reactionId), metabMap, self.toStyleStr())
418 404
419 # Now we style the arrow head(s): 405 # Now we style the arrow head(s):
420 idOpt1, idOpt2 = getArrowHeadElementId(reactionId) 406 idOpt1, idOpt2 = getArrowHeadElementId(reactionId)
421 self.applyTo(idOpt1, metabMap, self.toStyleStr(downSizedForTips = True)) 407 self.applyTo(idOpt1, metabMap, self.toStyleStr(downSizedForTips = True))