Closed wan-nie closed 3 months ago
Hi @wan-nie,
Thanks for reporting this, indeed it was a bug I introduced in the last version. I removed the deepcopy for a standard one and then it works, you can install the latest version with the fix by running this line:
pip install git+https://github.com/saezlab/decoupler-py
However, I would advice on not running the simple t-test we showed in the book and rather use a proper differential testing framework such as DESeq2. You can find a complete vignette showing how to infer cell-cell communication events with DEA in this vignette from our liana+ docs. Hope this is helpful!
Hi @PauBadiaM,
Thank you for the prompt reply and helpful suggestions on CCC inference. I believe this issue has been resolved now.
Describe the bug I found the issue when I played with
get_contrast()
in sc-best-practices.This is related to the following code: https://github.com/saezlab/decoupler-py/blob/6539a6e044a4cb8ec70662027d900d4d067b3324/decoupler/utils_anndata.py#L511
I checked the
copy.deepcopy
part and found that it returns a view of the original AnnData object rather than the expected sliced copy.This could result in
get_contrast()
not producing a slicedsub_adata
as anticipated. I am new to AnnData, and not sure if this is an intended feature.To Reproduce Run the notebook in sc-best-practices.
System Python 3.10 scanpy 1.9.6 anndata 0.10.3 decoupler 1.6.0