Closed zhangdae closed 2 months ago
omicverse 1.6.3 ,anndata 0.10.8
name: omicverse channels:
This looks like a bug caused by scanpy
. You can run the following code before ov.single.cosg
:
import numpy as np
vessel.uns['log1p']['base'] = np.e
and then run the ov.single.cosg
like:
sc.tl.dendrogram(vessel, groupby='celltype',use_rep='X_scANVI')
sc.tl.rank_genes_groups(vessel, groupby='celltype',
method='wilcoxon',use_rep='X_scANVI',)
ov.single.cosg(vessel, key_added='celltype_cosg', groupby='celltype')
This looks like a bug caused by
scanpy
. You can run the following code beforeov.single.cosg
:import numpy as np vessel.uns['log1p']['base'] = np.e
and then run the
ov.single.cosg
like:sc.tl.dendrogram(vessel, groupby='celltype',use_rep='X_scANVI') sc.tl.rank_genes_groups(vessel, groupby='celltype', method='wilcoxon',use_rep='X_scANVI',) ov.single.cosg(vessel, key_added='celltype_cosg', groupby='celltype')
maybe vessel.uns['log1p']['base']
set to None
is better.
Im trying to find DEGs between the leiden clusters use ov.single.cosg Here is a simple example.
adata
ov.single.cosg(adata,groupby='leiden_0.8',key_added='cosg')
I have found some errors like this https://github.com/scverse/scanpy/issues/2239 One comment refers that he add
adata.uns['log1p']["base"] = None
,so I tryied that advicebdata=adata
bdata.uns['log1p']["base"] = None
ov.single.cosg(bdata,groupby='leiden_0.8',key_added='cosg')
It literally fixed the problem,but something still goes wrong
In the line 566,it try to assign adata.uns['rank_genes_groups'] to adata.uns[key_added],but the structure fo anndata is like below the uns['cosg'] had added to anndata,but nothing names rank_genes_groups
And it looks like alright
bdata.uns['cosg']