bunnech/cellot

Scanpy/anndata error.

mksingh2104 opened this issue · 2 comments

With following run command:

python3 ./scripts/train.py --outdir ./results/scrna-sciplex3/drug-ruxolitinib/model-cellot --config ./configs/tasks/sciplex3.yaml --config ./configs/models/cellot.yaml --config.data.target ruxolitinib

I am getting following error:

Traceback (most recent call last):
File "/home/centos/anaconda3/envs/cellot/lib/python3.9/site-packages/anndata/_io/utils.py", line 177, in func_wrapper
return func(elem, *args, **kwargs)
File "/home/centos/anaconda3/envs/cellot/lib/python3.9/site-packages/anndata/_io/h5ad.py", line 527, in read_group
EncodingVersions[encoding_type].check(
File "/home/centos/anaconda3/envs/cellot/lib/python3.9/enum.py", line 408, in getitem
return cls.member_map[name]
KeyError: 'dict'

During handling of the above exception, another exception occurred:


I believe this is due to the fact that dataset has been created using a newer version of scanpy while cellot is trying to read it with an older version (scanpy==1.8.1). If I am attempting to upgrade scanpy to newer version, it fixing this particular issue but I believe this causing new errors.

I would appreciate more help in this regard.

I cannot reproduce the error using scanpy==1.9.1 and anndata==0.8.0 and all running without errors. Can you please check on your end?

Thanks for your reply.

I attempted with dataset provided here ( https://www.research-collection.ethz.ch/handle/20.500.11850/609681 ) and it works perfectly fine. This totally solves my issue.

Now coming to the error I was getting, if I try to read new test dataset ( https://polybox.ethz.ch/index.php/s/RAykIMfDl0qCJaM ) using scanpy==1.8.1 (current CellOT default in requirements.txt), I get same error. Likely because revised test dataset is written with more recent version of scanpy.

I am going to update cellot environment with scanpy==1.9.1 and anndata==0.8.0, and will let you know if I encounter any issue.

Sincerely,