# HG changeset patch # User francesco_lapi # Date 1722440009 0 # Node ID 271e2f36349bc48a4157373b68bdfea2bd207f66 # Parent 3098ceac725dda02bef07a328b57dbab9c1699a3 Uploaded diff -r 3098ceac725d -r 271e2f36349b marea_2/flux_to_map.py --- a/marea_2/flux_to_map.py Wed Jul 31 15:13:42 2024 +0000 +++ b/marea_2/flux_to_map.py Wed Jul 31 15:33:29 2024 +0000 @@ -378,7 +378,7 @@ Invalid = "#BEBEBE" # gray, fold-change under treshold UpRegulated = "#ecac68" # red, up-regulated reaction DownRegulated = "#6495ed" # blue, down-regulated reaction - + Transparent = "#FFFFFF00" # white, no enrichment UpRegulatedInv = "#FF0000" # ^^^ different shade of red (actually orange), up-regulated net value for a reversible reaction with # conflicting enrichment in the two directions. @@ -430,6 +430,7 @@ idOpt1, idOpt2 = getArrowHeadElementId(reactionId) self.applyTo(idOpt1, metabMap, self.toStyleStr(downSizedForTips = True)) if idOpt2: self.applyTo(idOpt2, metabMap, self.toStyleStr(downSizedForTips = True)) + else: TRANSPARENT_ARROW.styleReactionElements(metabMap, idOpt2) def getMapReactionId(self, reactionId :str, mindReactionDir :bool) -> str: """ @@ -463,7 +464,7 @@ # was built by brainless organisms so here we are! INVALID_ARROW = Arrow(Arrow.MIN_W, ArrowColor.Invalid) INSIGNIFICANT_ARROW = Arrow(Arrow.MIN_W, ArrowColor.Invalid, isDashed = True) - +TRANSPARENT_ARROW = Arrow(Arrow.MIN_W, ArrowColor.Transparent) def applyRpsEnrichmentToMap(rpsEnrichmentRes :Dict[str, Union[Tuple[float, FoldChange], Tuple[float, FoldChange, float, float]]], metabMap :ET.ElementTree, maxNumericZScore :float) -> None: """ Applies RPS enrichment results to the provided metabolic map.