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 in network.batch_removal() due to missing positional argument in AnnData.concatenate() #83

Open
macelik opened this issue Jul 7, 2023 · 5 comments

Comments

@macelik
Copy link

macelik commented Jul 7, 2023

Hello,

I'm encountering an issue while using scgen for batch correction. The training part works fine, but I'm facing an error when calling network.batch_removal(). The error message is as follows:

Traceback (most recent call last): File "/work/project/ladcol_011/polish/community-paper/src/data_preprocessing/vanGalen_Hourigan/./quick.py", line 281, in <module> adata_afterCorrection = network.batch_removal() File "/work/project/ladcol_011/conda_path/miniconda3/envs/scgen-env/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/work/project/ladcol_011/conda_path/miniconda3/envs/scgen-env/lib/python3.10/site-packages/scgen/_scgen.py", line 268, in batch_removal all_shared_ann = AnnData.concatenate( TypeError: AnnData.concatenate() missing 1 required positional argument: 'self'

I have attempted to resolve this issue by trying different versions of Python (3.7 and 3.10) as well as different versions of anndata (0.8, 0.9, and 0.9.1). Additionally, I have tested solutions mentioned in previous issues, such as using pandas==1.5.2. I have also tried the pull request that aims to address this problem (#77), but unfortunately, none of these attempts have been successful.

I would greatly appreciate any assistance you can provide.

@umahajanatlmu
Copy link

Hi, any update with this issue?
I am also encountering same issue. Your help would be greatly appreciated.

@M0hammadL
Copy link
Member

@Koncopd

@macelik
Copy link
Author

macelik commented Aug 10, 2023

Hi, any update with this issue? I am also encountering same issue. Your help would be greatly appreciated.

Hi there, I got it working by installing the below libraries with the specified versions, and I have applied the changes in this PR #77.

anndata==0.9.1
pandas==1.5.3
scanpy==1.9.3
scgen==2.1.0 and python==3.8

@umahajanatlmu
Copy link

umahajanatlmu commented Aug 10, 2023

@macelik thank you. I tried it. however I am getting error
`

corrected_adata = model.batch_removal()
Traceback (most recent call last):
File "", line 1, in
File "/dss/dsshome1/lxc00/ru64waf2/miniconda3/envs/PYenv/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/dss/dsshome1/lxc00/ru64waf2/miniconda3/envs/PYenv/lib/python3.8/site-packages/scgen/_scgen.py", line 268, in batch_removal
all_shared_ann = AnnData.concatenate(
TypeError: concatenate() missing 1 required positional argument: 'self'
`

@Koncopd
Copy link
Member

Koncopd commented Aug 10, 2023

@umahajanatlmu it seems that you need the packages versions listed here #82

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

4 participants