You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using adata which was upgraded to the new schema, clonotype_modularity() throws the following error.
/home/rieder/.conda/envs/scirpy/lib/python3.10/site-packages/scipy/optimize/_numdiff.py:576: RuntimeWarning: invalid value encountered in subtract
df = fun(x) - f0
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[173], line 1
----> 1 ir.tl.clonotype_modularity(adata, target_col="cc_aa_alignment", connectivity_key='connectivities')
File ~/.conda/envs/scirpy/lib/python3.10/site-packages/scirpy/tl/_clonotype_modularity.py:159, in clonotype_modularity(adata, target_col, connectivity_key, permutation_test, n_permutations, key_added, inplace, fdr_correction, random_state, airr_mod)
155 # remove the entries from previous run, should they exist
156 # results can be inconsisten otherwise (old dangling "fdr" values when only
157 # pvalues are calculated)
158 for suffix in ["fdr", "pvalue"]:
--> 159 for d in [params.mdata, params.adata]:
160 try:
161 del d.obs[f"{key_added}_{suffix}"]
File ~/.conda/envs/scirpy/lib/python3.10/site-packages/scirpy/util/__init__.py:239, in DataHandler.mdata(self)
237 return self._data
238 else:
--> 239 raise AttributeError("DataHandler was initalized with only AnnData")
AttributeError: DataHandler was initalized with only AnnData
To Reproduce
Use an AnnData object created with scirpy version < 0.13.0, upgrad with scirpy.io.upgrade_schema() follow the 3k Tcell tutorial and run ir.tl.clonotype_modularity(adata, target_col="cc_aa_alignment", connectivity_key='connectivities')
* Defer accessing params attributes until in try block
* Update CHANGELOG.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
When using
adata
which was upgraded to the new schema,clonotype_modularity()
throws the following error.To Reproduce
Use an AnnData object created with scirpy version < 0.13.0, upgrad with
scirpy.io.upgrade_schema()
follow the 3k Tcell tutorial and runir.tl.clonotype_modularity(adata, target_col="cc_aa_alignment", connectivity_key='connectivities')
Expected behaviour
function call w/o error
System
scirpy==0.13.0 scanpy==1.9.3 anndata==0.9.1 umap==0.5.3 numpy==1.23.5 scipy==1.10.1 pandas==1.5.3 scikit-learn==1.2.2 statsmodels==0.13.5 python-igraph==0.10.3 pynndescent==0.5.10
The text was updated successfully, but these errors were encountered: