Mercurial > repos > bimib > cobraxy
changeset 287:c8622bca2480 draft
Uploaded
author | francesco_lapi |
---|---|
date | Wed, 14 May 2025 09:23:52 +0000 |
parents | eaa623b4b703 |
children | d1d732d1705c |
files | COBRAxy/marea.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/COBRAxy/marea.py Wed May 14 08:44:03 2025 +0000 +++ b/COBRAxy/marea.py Wed May 14 09:23:52 2025 +0000 @@ -371,8 +371,10 @@ Returns: Tuple[str, str]: either a single str ID for the correct arrow head followed by an empty string or both options to try. """ + print("getArrowHeadElementId: ", reactionId) if reactionId.endswith("_RV"): reactionId = reactionId[:-3] #TODO: standardize _RV elif ReactionDirection.fromReactionId(reactionId) is not ReactionDirection.Unknown: + print(f"getArrowHeadElementId: {reactionId} this was not unknown.") return reactionId[:-3:-1] + reactionId[:-2], "" # ^^^ Invert _F to F_ return f"F_{reactionId}", f"B_{reactionId}" @@ -382,6 +384,7 @@ Encodes possible arrow colors based on their meaning in the enrichment process. """ Invalid = "#BEBEBE" # gray, fold-change under treshold + Transparent = "#ffffff00" # transparent, not significant p-value UpRegulated = "#ecac68" # orange, up-regulated reaction DownRegulated = "#6495ed" # lightblue, down-regulated reaction @@ -434,6 +437,7 @@ # Now we style the arrow head(s): idOpt1, idOpt2 = getArrowHeadElementId(reactionId) + print("styleReactionElements: ", idOpt1, idOpt2) self.applyTo(idOpt1, metabMap, self.toStyleStr(downSizedForTips = True)) if idOpt2: self.applyTo(idOpt2, metabMap, self.toStyleStr(downSizedForTips = True)) @@ -496,10 +500,12 @@ if isinstance(foldChange, str): foldChange = float(foldChange) if pValue >= ARGS.pValue: # pValue above tresh: dashed arrow + print("Invalid pValue: ", pValue) INSIGNIFICANT_ARROW.styleReactionElements(metabMap, reactionId) continue if abs(foldChange) < (ARGS.fChange - 1) / (abs(ARGS.fChange) + 1): + print("Invalid fc: ", foldChange) INVALID_ARROW.styleReactionElements(metabMap, reactionId) continue