Skip to content
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

plot_intercellular_flows ERROR #21

Open
wolfQK opened this issue Nov 11, 2024 · 2 comments
Open

plot_intercellular_flows ERROR #21

wolfQK opened this issue Nov 11, 2024 · 2 comments

Comments

@wolfQK
Copy link

wolfQK commented Nov 11, 2024

fs.pl.plot_intercellular_flows(adata, flow_network = flow_network, inflow_vars = ['NCL', 'SSTR2'], module_vars =['GEM-4', 'GEM-2'] , flowsig_network_key = 'f
lowsig_network', align_mode = 'horizontal', width_scale = 2.0, x_margin_offset = 0.3, y_margin_offset = 0.0, ax=ax)

When I use the above code to specify any two among inflow_vars, outflow_vars, or module_vars for visualization, the following error occurs.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "test/flowsig/lib/python3.8/site-packages/flowsig/plotting/_plotting.py", line 194, in plot_intercellular_flows
    elif var_types_used.sum(2) == 2:
  File "test/flowsig/lib/python3.8/site-packages/numpy/core/_methods.py", line 48, in _sum
    return umr_sum(a, axis, dtype, out, keepdims, initial, where)
numpy.AxisError: axis 2 is out of bounds for array of dimension 1

What is causing this issue? I hope to get your reply,Thanks!
@axelalmet

@axelalmet
Copy link
Owner

Hi wolfQK,

Thanks for the question and sorry for my slowness in getting back to you! The error is because of a mistake I made. It should be var_types_used.sum() == 2 not var_types_used.sum(2) == 2.

I've updated the repository to fix this. Would you be able to reinstall FlowSig and see if this error still remains? Thank you!

Best wishes,
Axel.

@wolfQK
Copy link
Author

wolfQK commented Dec 6, 2024

Yeah, It works!Thank you very much ! @axelalmet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants