Skip to content

Commit

Permalink
Don't include self corr in check and fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed May 3, 2024
1 parent 3e10e7e commit bab7281
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions depmap_analysis/network_functions/net_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,12 @@ def add_corr_to_edges(graph: DiGraph, z_corr: pd.DataFrame,
)
z_sc_values = z_corr.values
z_sc_max = np.max(
np.nanmax(z_sc_values[z_sc_values != np.inf]),
np.abs(np.nanmin(z_sc_values[z_sc_values != -np.inf]))
[
np.nanmax(z_sc_values[(z_sc_values != np.inf) & (z_sc_values != self_corr)]),
np.abs(np.nanmin(
z_sc_values[(z_sc_values != -np.inf) & (z_sc_values != self_corr)]
))
]
)
for u, v, data in tqdm(graph.edges(data=True)):
un = u[0] if isinstance(u, tuple) else u
Expand Down

0 comments on commit bab7281

Please sign in to comment.