theislab / scgen

Single cell perturbation prediction
https://scgen.readthedocs.io
GNU General Public License v3.0
255 stars 51 forks source link

AttributeError: 'SCGEN' object has no attribute 'summary_stats' #63

Closed YY-SONG0718 closed 2 years ago

YY-SONG0718 commented 2 years ago

Dear developers,

Many thanks for creating this exciting method. I experienced an issue while following the SCGEN: Batch-Removal tutorial. I used the example data and followed every step as is in the tutorial.

When I run model = scgen.SCGEN(train), the following error occurred:


AttributeError Traceback (most recent call last) /tmp/ipykernel_1027254/2139969373.py in ----> 1 model = scgen.SCGEN(train)

/nfs/research/ysong/anaconda3/envs/scgen-env/lib/python3.7/site-packages/scgen/_scgen.py in init(self, adata, n_hidden, n_latent, n_layers, dropout_rate, **model_kwargs) 59 60 self.module = SCGENVAE( ---> 61 n_input=self.summary_stats.n_vars, 62 n_hidden=n_hidden, 63 n_latent=n_latent,

AttributeError: 'SCGEN' object has no attribute 'summary_stats'


Checking the source code I do not find the definition of attribute summary_stats for object SCGEN indeed.

Python version: Python 3.7.12 scGen version: 2.1.0 Means to install scGen: pip install git+https://github.com/theislab/scgen.git

May I kindly ask how to resolve this issue?

Cheers, Yuyao Song

adamgayoso commented 2 years ago

Please check again the tutorial on the docs, which you can run in colab, and has been tested to work