Mercurial > repos > bimib > marea_2
changeset 295:c500117b79e2 draft
Uploaded
author | luca_milaz |
---|---|
date | Mon, 05 Aug 2024 10:02:24 +0000 |
parents | d281a6e06489 |
children | 3e24934edf12 |
files | marea_2/flux_to_map.py |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/marea_2/flux_to_map.py Mon Aug 05 09:48:18 2024 +0000 +++ b/marea_2/flux_to_map.py Mon Aug 05 10:02:24 2024 +0000 @@ -926,11 +926,17 @@ colors_mean = {rxn_id: rgb_to_hex(jet_colormap(means[key][i])) for i, rxn_id in enumerate(ids)} for rxn_id in ids: + new_rxn_id="" + if(medians[key][rxn_id] < 0): + new_rxn_id = "B_" + rxn_id + else: + new_rxn_id = "F_" + rxn_id + # Apply median arrows - apply_arrow(metabMap_median, rxn_id, colors_median[rxn_id]) + apply_arrow(metabMap_median, new_rxn_id, colors_median[rxn_id]) # Apply mean arrows - apply_arrow(metabMap_mean, rxn_id, colors_mean[rxn_id]) + apply_arrow(metabMap_mean, new_rxn_id, colors_mean[rxn_id]) # Save and convert the SVG files save_and_convert(metabMap_mean, "mean", key) @@ -949,11 +955,11 @@ None """ arrow = Arrow(width=5, col=color) - arrow.styleReactionElements(metabMap, rxn_id, mindReactionDir=True) - '''idOpt1, idOpt2 = getArrowHeadElementId(rxn_id) + arrow.styleReactionElements(metabMap, rxn_id, mindReactionDir=False) + idOpt1, idOpt2 = getArrowHeadElementId(rxn_id) arrow.applyTo(idOpt1, metabMap, arrow.toStyleStr(downSizedForTips=True)) if idOpt2: - arrow.applyTo(idOpt2, metabMap, arrow.toStyleStr(downSizedForTips=True))''' + arrow.applyTo(idOpt2, metabMap, arrow.toStyleStr(downSizedForTips=True)) def save_and_convert(metabMap, map_type, key): """