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

ValueError: too many values to unpack (expected 2) #1

Open
OMIC-coding opened this issue Aug 31, 2024 · 3 comments
Open

ValueError: too many values to unpack (expected 2) #1

OMIC-coding opened this issue Aug 31, 2024 · 3 comments

Comments

@OMIC-coding
Copy link

I encountered a bug called ValueError: too many values to unpack (expected 2) when I runned the following codes:

Construct the flow expression matrices

commot_output_key = 'commot-CellPhoneDB_v4.0'
fs.pp.construct_flows_from_commot(adata,
commot_output_key=commot_output_key,
gem_expr_key='X_gem',
scale_gem_expr=True,
flowsig_network_key='flowsig_network',
flowsig_expr_key='X_flow'
)
The information of the used adata is as follows:
AnnData object with n_obs × n_vars = 4893 × 1844
obs: 'in_tissue', 'array_row', 'array_col', 'n_genes', 'n_counts', 'MITF_regulon'
var: 'gene_ids', 'feature_types', 'genome', 'highly_variable', 'means', 'dispersions', 'dispersions_norm'
uns: 'spatial', 'log1p', 'hvg', 'commot-CellPhoneDB_v4.0-info', 'nsf_info'
obsm: 'spatial', 'commot-CellPhoneDB_v4.0-sum-sender', 'commot-CellPhoneDB_v4.0-sum-receiver', 'X_gem'
layers: 'count'
obsp: 'commot-CellPhoneDB_v4.0-SPP1-CD44', 'commot-CellPhoneDB_v4.0-LGALS9-CD44', 'commot-CellPhoneDB_v4.0-LGALS9-SLC1A5', 'commot-CellPhoneDB_v4.0-CCL4L2-VSIR', 'commot-CellPhoneDB_v4.0-FGF2-CD44', 'commot-CellPhoneDB_v4.0-nan', 'commot-CellPhoneDB_v4.0-total-total'

@axelalmet
Copy link
Owner

Hi Joey,

Thanks for your interest in FlowSig! I checked the code and found some errors in the functions used to construct the inflow variables. I'm so sorry about that!

I have fixed these changes and updated the repository. Please could you update the installation to the latest version and let me know if that works? Thank you!

Best wishes,
Axel.

@OMIC-coding
Copy link
Author

Thanks for your prompt reply, this step works now. However, I'm wondering if it's possible for you to provide some guidance on visualization of the flow_network, especially for the spatial transcriptomic part~

@axelalmet
Copy link
Owner

axelalmet commented Sep 5, 2024

Hi Joey,

Sorry for the late reply. My plan is to update the repository to include the functions to generate the visualisations done in the paper and notebooks with visualisation examples. But effectively, if you have experience with NetworkX, we use the adjacency matrices to construct a DirectedGraph, e.g., via this function, which we then visualise as multipartite networks.

I'll try to update the repository by the end of week/start of next week!

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