Skip to content

TypeError: 'NoneType' object is not callable #454

Description

@sun-fei2026

Dear team,
When I run the data.plt.paga_plot, it shows: "TypeError: 'NoneType' object is not callable." What could be the possible reasons?
Thanks,
sunfei

data.plt.paga_plot(
... adjacency='connectivities_tree', # keyword to use for paga or paga tree
... threshold=0.01, # prune edges lower than threshold
... layout='fr' # the method to layout each node
... )
Traceback (most recent call last):
File "", line 1, in
File "/home/sunfei/.conda/envs/stereo_env/lib/python3.8/site-packages/stereo/plots/decorator.py", line 52, in wrapped
fig: Figure = func(*args, **kwargs)
TypeError: 'NoneType' object is not callable
stereo_env.version
'1.6.2'

The full code that I executed is shown below:
import os
import stereo as stereo_env
import warnings
warnings.filter
warnings('ignore')

base_dir = "/mnt/sdb/sunfei/stomics/Y01502PD/Mouse_Brain/feature_expression"
os.chdir(base_dir)

read data

data = stereo_env.io.read_h5ad('/mnt/sdb/sunfei/stomics/Multi_Sample/06.Time_Series_analysis/AnnData_075/Embyro_E9.5.h5ad')

preprocessing

data.tl.cal_qc()
data.tl.raw_checkpoint()
data.tl.normalize_total(target_sum=1e4)
data.tl.log1p()

hvg

data.tl.highly_variable_genes(min_mean=0.0125, max_mean=3, min_disp=0.5, res_key='highly_variable_genes', n_top_genes=None)

data.tl.scale(zero_center=False)

embedding

data.tl.pca(use_highly_genes=True, hvg_res_key='highly_variable_genes', n_pcs=20, res_key='pca', svd_solver='arpack')
data.tl.neighbors(pca_res_key='pca', n_pcs=30, res_key='neighbors', n_jobs=-1)
data.tl.umap(pca_res_key='pca', neighbors_res_key='neighbors', res_key='umap')

data.tl.paga(groups='annotation', neighbors_key='neighbors')

data.tl.result['paga']

#PAGA可视化
data.plt.paga_plot(
adjacency='connectivities_tree', # keyword to use for paga or paga tree
threshold=0.01, # prune edges lower than threshold
layout='fr' # the method to layout each node
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions