desc
desc copied to clipboard
msg error
Hi, I am unable to figure out the following error. could you help? Thanks.
dtype: int64 The desc has been trained successfully!!!!!! The summary of desc model is:
Layer (type) Output Shape Param #
input (InputLayer) (None, 1000) 0
encoder_0 (Dense) (None, 64) 64064
encoder_1 (Dense) (None, 32) 2080
clustering (ClusteringLayer) (None, 10) 320
Total params: 66,464 Trainable params: 66,464 Non-trainable params: 0
The runtime of (resolution=0.8)is: 136.45320010185242 /Users/tommy/miniconda3/envs/DESC/lib/python3.6/site-packages/umap/spectral.py:229: UserWarning: Embedding a total of 3 separate connected components using meta-embedding (experimental) n_components
AttributeError Traceback (most recent call last)
~/desc-1.0.0.2/desc/models/desc.py in train(data, dims, alpha, tol, init, n_clusters, louvain_resolution, n_neighbors, pretrain_epochs, batch_size, activation, actincenter, drop_rate_SAE, is_stacked, use_earlyStop, use_ae_weights, save_encoder_weights, save_encoder_step, save_dir, max_iter, epochs_fit, num_Cores, num_Cores_tsne, use_GPU, random_seed, verbose, do_tsne, learning_rate, perplexity, do_umap, kernel_clustering) 324 perplexity=perplexity, 325 do_umap=do_umap, --> 326 kernel_clustering=kernel_clustering) 327 #update adata 328 data=res
~/desc-1.0.0.2/desc/models/desc.py in train_single(data, dims, alpha, tol, init, n_clusters, louvain_resolution, n_neighbors, pretrain_epochs, batch_size, activation, actincenter, drop_rate_SAE, is_stacked, use_earlyStop, use_ae_weights, save_encoder_weights, save_encoder_step, save_dir, max_iter, epochs_fit, num_Cores, num_Cores_tsne, use_GPU, random_seed, verbose, do_tsne, learning_rate, perplexity, do_umap, kernel_clustering)
167 sc.tl.umap(adata)
168 adata.obsm["X_umap"+str(louvain_resolution)]=adata.obsm["X_umap"].copy()
--> 169 sc.logging.msg(' umap finished', t=True, end=' ', v=4)
170 sc.logging.msg('and added\n'
171 ' 'X_umap''+str(louvain_resolution),'the umap coordinates (adata.obsm)\n', v=4)
AttributeError: module 'scanpy.api.logging' has no attribute 'msg'
This is after running the following cmd:
sc.pp.log1p(adata) sc.pp.filter_genes_dispersion(adata,n_top_genes=1000) sc.pp.scale(adata,max_value=6) save_dir="paul_result" adata=desc.train(adata, dims=[adata.shape[1],64,32], tol=0.005, n_neighbors=10, batch_size=256, louvain_resolution=[0.8,1.0],# not necessarily a list, you can only set one value, like, louvain_resolution=1.0 save_dir=str(save_dir), learning_rate=200, # the parameter of tsne use_GPU=False, num_Cores=1, #for reproducible, only use 1 cpu num_Cores_tsne=4, save_encoder_weights=False, save_encoder_step=3,# save_encoder_weights is False, this parameter is not used use_ae_weights=False, do_umap=True) #if do_uamp is False, it will don't compute umap coordiate
This due to the version of scanpy
, the new release of scanpy.api.logging has no slot of msg.
Is there a workaround? I am getting the same error and it seems that this error stops the rest of the program from running, i.e. does not run UMAP calculation or transition probability calculation because it errors right after the TSNE calculation.
Is there a workaround? I am getting the same error and it seems that this error stops the rest of the program from running, i.e. does not run UMAP calculation or transition probability calculation because it errors right after the TSNE calculation.
Hi gouinK, this due to the version of python module scanpy, the new release of scanpy.api.logging has no slot of msg. I will fix it as soon as possible. Thank you
Has this been fixed? I got the same issue of no 'msg' attribute. Thanks.
I experience the same problem. Is there a fix available for this issue?
JuHey, I ended up installing an earlier version of the dependency package genomics/bcftbx (commit 0cac3a75b6802ec623522d060df5dff8d823bfec) to bypass this issue.
Thank you very much!!!