Closed flamesrui closed 2 months ago
Dear Dr Zheng, Thank you for providing MEBOCOST. When using "mebo_obj.infer_commu" function, i found one error below.
commu_res = mebo_obj.infer_commu( n_shuffle=1000, seed=12345, Return=True, thread=None, save_permuation=False, min_cell_number = 1 )
could you provide a solution? Thank you. Looking forward to your reply.
Hi, thank you for using MEBOCOST. To be honest, I never met this error before. Could you please let me know more about your error report? The screenshot looks like a part of them. Do you mind letting me know your parameters in mebocost.create_obj function? I will try to figure it out.
Thank you for your reply! I used the GSE103322 dataset, which processed in Seurat, to run MEBOCOST.
the python code below:
import os,sys import scanpy as sc import pandas as pd import numpy as np from matplotlib import pyplot as plt import seaborn as sns
from mebocost import mebocost sc.settings.verbosity = 3 # verbosity: errors (0), warnings (1), info (2), hints (3)
sc.settings.set_figure_params(dpi=300, frameon=False, figsize=(3, 3), facecolor='white') adata = sc.read_h5ad('D:/单细胞/GSE103322/seurat2scanpy.h5ad') adata adata.X= adata.X.A
exp_mat = pd.DataFrame(adata.X, columns = adata.var_names, index = adata.obs_names).T cell_ann = adata.obs
mebo_obj = mebocost.create_obj( adata = adata, group_col = ['celltype'], met_est = 'mebocost', config_path = 'D:\MEBOCOST\mebocost.conf', exp_mat=None, cell_ann=None, species='human', met_pred=None, met_enzyme=None, met_sensor=None, met_ann=None, scFEA_ann=None, compass_met_ann=None, compass_rxn_ann=None, gene_network=None, gmt_path=None, cutoff_exp=0, cutoff_met=0, cutoff_prop=0.25, sensor_type=['Receptor', 'Transporter', 'Nuclear Receptor'], thread=8 )
mebo_obj._loadconfig() mebo_obj.estimator()
met_mat = pd.DataFrame(mebo_obj.met_mat.toarray(), index = mebo_obj.met_mat_indexer, columns = mebo_obj.met_mat_columns)
met_mat.head() met_mat.to_csv(r'D:\singlecellpython\metabolite estimation result.csv')
commu_res = mebo_obj.infer_commu( n_shuffle=1000, seed=12345, Return=True, thread=None, save_permuation=False, min_cell_number=1 )
**_and the error happened in the "mebo_obj.infer_commu" function and it will not stop but rerun this function and the whole error report below:_**
Thank you. Looking forward to your next reply.
Hi, sorry for the late response, have you got any solutions already? It looks like that the problem may caused by windows system as discussed here. I can try to update MEBOCOST later, but now I may suggest to try without multiple threads or change to another system, such as linux if you have one, for you to quickly resolve the problem.
Dear Dr Zheng, Thank you for providing MEBOCOST. When using "mebo_obj.infer_commu" function, i found one error below.
commu_res = mebo_obj.infer_commu( n_shuffle=1000, seed=12345, Return=True, thread=None, save_permuation=False, min_cell_number = 1 )