-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: (19, 11)" AND AttributeError: module 'flowsig.plotting' has no attribute 'plot_differentially_flowing_signals'" #11
Comments
Hello! Have you solved it? I also got this when flowsig running. Can I ask for the solution? |
@yang-lin-pp if add_edge:
However, I am uncertain whether this approach is reasonable. This may potentially affect some outcomes。 For the second question,I haven't figured out it yet. |
Hi @YuNong-Qiu, First up, sorry about the late response! You did nothing wrong, but I hadn't fully implemented So now, if you want to plot the differentially inflowing variables, try calling something like:
Note that you have to set I'll update the README.md to include an example and add a notebook example to show how you can use it by the end of this week. Thank you for your patience! |
Dear @axelalmet , |
Dear Author,
I encountered some issues while executing the code.
When I used the function 'fs.tl.construct_intercellular_flow_network(adata_dis, flowsig_network_key='flowsig_network', adjacency_key='adjacency_validated_filtered')', I encountered a KeyError. And I have checked the data 'adata_dis.uns['flowsig_network']['network']['adjacency_validated_filtered']', but it seemed no problem.
And I am unable to generate the plot using 'fs.pl.plot_differentially_flowing_signals'. The code and the error message are below.
I am eagerly awaiting your guidance on this matter. Thank you in advance for your assistance!
--1--
CODE:
flow_network = fs.tl.construct_intercellular_flow_network(adata_dis,
flowsig_network_key = 'flowsig_network',
adjacency_key = 'adjacency_validated_filtered')
{
"name": "KeyError",
"message": "(19, 11)",
"stack": "---------------------------------------------------------------------------
OUTPUT:
KeyError Traceback (most recent call last)
Cell In[51], line 1
----> 1 flow_network = fs.tl.construct_intercellular_flow_network(adata_dis,
2 flowsig_network_key = 'flowsig_network',
3 adjacency_key = 'adjacency_validated_filtered')
File c:\Users\Q\.conda\envs\COMMOT\Lib\site-packages\flowsig\tools\_validate_network.py:380, in construct_intercellular_flow_network(adata, flowsig_network_key, adjacency_key)
376 total_edge_weight = total_edge_weights[undirected_edge]
378 else:
--> 380 total_edge_weight = total_edge_weights[(undirected_edge[1], undirected_edge[0])]
382 flow_network.add_edge(*undirected_edge)
383 flow_network.edges[undirected_edge[0], undirected_edge[1]]['weight'] = min(total_edge_weight, 1.0)
KeyError: (19, 11)"
}
--2--
CODE:
fs.pl.plot_differentially_flowing_signals(
adata = adata_dis,
condition_key = 'Condition',
pert_key = 'GAS6',
var_type = 'inflow',
flowsig_expr_key = 'X_flow',
flowsig_network_key = 'flowsig_network_orig',
qval_threshold = 0.05,
logfc_threshold = 0.5,
label_lowqval = True
)
OUTPUT:
{
"name": "AttributeError",
"message": "module 'flowsig.plotting' has no attribute 'plot_differentially_flowing_signals'",
"stack": "---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[80], line 1
----> 1 fs.pl.plot_differentially_flowing_signals(
2 adata = adata_dis,
3 condition_key = 'Condition',
4 pert_key = 'GAS6',
5 var_type = 'inflow',
6 flowsig_expr_key = 'X_flow',
7 flowsig_network_key = 'flowsig_network_orig',
8 qval_threshold = 0.05,
9 logfc_threshold = 0.5,
10 label_lowqval = True
11 )
AttributeError: module 'flowsig.plotting' has no attribute 'plot_differentially_flowing_signals'"
}
The text was updated successfully, but these errors were encountered: