You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
following the DEA for CCC tutorial, I am having difficulty in properly saving the resulting network
The call
cn.methods.carnival.visualize_network(df_res)
result in a graphviz.graphs.Digraph object
I save it to a file doing the following
p = cn.methods.carnival.visualize_network(df_res)
p.render(locplotDIR + '/potential_regulatory_cascade', format='pdf')
As a result I get 2 files, one is the PDF (attached). You can see I get multiple edges for the same pair of nodes, some edges are black, some blue and some red.
I have multiple edges because the resulting df_res , from running li.mt.find_causalnet, has multiple entries for the same source-target pair. For instance, the Insr-Ptpn11 has 5 edges, 4 red and one black. The df_res shows
source source_type source_weight source_pred_val target target_type target_weight target_pred_val edge_type edge_pred_val
33 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
31 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
29 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
30 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
28 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
I should also point out that I had to run li.mt.find_causalnet using the SCIPY solver, for a license version issue on the cluster.
df_res, problem = li.mt.find_causalnet(prior_graph, input_scores, output_scores, node_weights, node_cutoff=0.1, max_penalty=1, min_penalty=0.01, edge_penalty=0.1, verbose=True, max_runs=50, stable_runs=10, solver='SCIPY')
The solutions are described as Optimal.
I am not sure why I get the same row multiple times. And I am not sure about the color scheme. Could you please clarify ?
Also, is 'render' the best way to save the network to file as image ?
Thanks
The text was updated successfully, but these errors were encountered:
I really suggest using the gurobi solver - it's likely that spicy's inbuilt one (HIGHs) is just resulting in very unstable results. @pablormier can maybe confirm or suggest how to improve the solutions by HIGHs as I haven't used it much (besides running the tests and for the simple example in the tutorial).
The system manager updated the Gurobi license file. Now things look ok.
In general, I have to say that I am not sure I understand the choice to use the stat without considering the p-value. I feel that the interèpretation of the signalling pathways becomes more difficult.
Hi,
following the DEA for CCC tutorial, I am having difficulty in properly saving the resulting network
The call
cn.methods.carnival.visualize_network(df_res)
result in a graphviz.graphs.Digraph object
I save it to a file doing the following
p = cn.methods.carnival.visualize_network(df_res)
p.render(locplotDIR + '/potential_regulatory_cascade', format='pdf')
As a result I get 2 files, one is the PDF (attached). You can see I get multiple edges for the same pair of nodes, some edges are black, some blue and some red.
I have multiple edges because the resulting df_res , from running li.mt.find_causalnet, has multiple entries for the same source-target pair. For instance, the Insr-Ptpn11 has 5 edges, 4 red and one black. The df_res shows
source source_type source_weight source_pred_val target target_type target_weight target_pred_val edge_type edge_pred_val
33 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
31 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
29 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
30 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
28 Insr input 1.08968 1.0 Ptpn11 unmeasured 0.0 1.0 1 1.0
I should also point out that I had to run li.mt.find_causalnet using the SCIPY solver, for a license version issue on the cluster.
df_res, problem = li.mt.find_causalnet(prior_graph, input_scores, output_scores, node_weights, node_cutoff=0.1, max_penalty=1, min_penalty=0.01, edge_penalty=0.1, verbose=True, max_runs=50, stable_runs=10, solver='SCIPY')
The solutions are described as Optimal.
I am not sure why I get the same row multiple times. And I am not sure about the color scheme. Could you please clarify ?
Also, is 'render' the best way to save the network to file as image ?
Thanks
The text was updated successfully, but these errors were encountered: