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

Error when using init_clustering with FlowSom method #53

Closed
DC123456789 opened this issue Aug 8, 2024 · 1 comment · Fixed by #54
Closed

Error when using init_clustering with FlowSom method #53

DC123456789 opened this issue Aug 8, 2024 · 1 comment · Fixed by #54
Labels
bug Something isn't working

Comments

@DC123456789
Copy link

DC123456789 commented Aug 8, 2024

Get this error when using init_clustering(initial_clustering_method="FS"):

Traceback (most recent call last):
  File "/ddn_exa/campbell/dchan/starling/run_starling.py", line 400, in <module>
    main()
  File "/ddn_exa/campbell/dchan/starling/run_starling.py", line 130, in main
    starling_adata = utility.init_clustering(cluster_type, sc_expr_subset_adata, k=leiden_resolution, seed=seed)
  File "/ddn_exa/campbell/dchan/starling/starling/utility.py", line 105, in init_clustering
    pd.DataFrame(X).to_csv("fs.csv")
NameError: name 'X' is not defined

Presumably, the error is that it should be adata.X instead of just X.

@DC123456789 DC123456789 added the bug Something isn't working label Aug 8, 2024
@cklamann cklamann mentioned this issue Aug 12, 2024
@cklamann
Copy link
Collaborator

Thanks for looking into this, @DC123456789. Indeed, changing from X to adata.X fixes the immediate issue, but there are downstream problems with a call by flowsom to pd.DataFrame.as_matrix, which was deprecated in pandas 0.23.0 and later removed. Because we've already done something similar to support later python versions (flowsom is rather out of date), I went ahead and patched the method on pd.DataFrame and pinned the minimum Pandas version to 0.23.0. This has the added benefit of opening up support for python 3.11 and 3.12. Changes can be reviewed in #54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants