# HG changeset patch # User francesco_lapi # Date 1722440630 0 # Node ID 2c5fe2bf1bd3c384b902e07348625805b3186ab8 # Parent 271e2f36349bc48a4157373b68bdfea2bd207f66 Uploaded diff -r 271e2f36349b -r 2c5fe2bf1bd3 marea_2/flux_to_map.py --- a/marea_2/flux_to_map.py Wed Jul 31 15:33:29 2024 +0000 +++ b/marea_2/flux_to_map.py Wed Jul 31 15:43:50 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. @@ -428,9 +428,9 @@ # Now we style the arrow head(s): idOpt1, idOpt2 = getArrowHeadElementId(reactionId) + print(idOpt1, idOpt2) 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: """ @@ -464,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.