jingshuw / SAVERX

R package for transfer learning of single-cell RNA-seq denoising
29 stars 9 forks source link

Error in data processed #19

Open jiananwehi opened 3 years ago

jiananwehi commented 3 years ago

I meet the following error when I run SAVERX example:

file <- saverx("./shekhar_downsampled.csv", data.species = "Mouse", use.pretrain = T, pretrained.weights.file = "./mouse_Retina.hdf5", model.species = "Mouse")

[1] "Use a pretrained model: Yes" [1] "Data species is: Mouse" [1] "Pretrained weights file is: ./mouse_Retina.hdf5" [1] "Model species is: Mouse" [1] "13004 genes mapped out of 13166" [1] "Gene names mapped, resulting file saved as: 1608194219.12617/tmpdata.rds" [1] "Reshaped file saved as: 1608194219.12617/tmpdata.mtx" [1] "Nonmissing indicator saved as: 1608194219.12617/tmpdata_nonmissing.txt" [1] "Data preprocessed ..." .../.local/lib/python3.8/site-packages/scanpy/api/init.py:3: FutureWarning:

In a future version of Scanpy, scanpy.api will be removed. Simply use import scanpy as sc and import scanpy.external as sce instead.

warnings.warn( Error in py_module_import(module, convert = convert) : ImportError: cannot import name 'stacked_violin' from 'scanpy.plotting._anndata' (.../.local/lib/python3.8/site-packages/scanpy/plotting/_anndata.py)

Detailed traceback: File ".../.local/lib/python3.8/site-packages/sctransfer/init.py", line 5, in from . import api, api_pretrain File ".../.local/lib/python3.8/site-packages/sctransfer/api.py", line 14, in from .io import read_dataset, normalize, write_text_matrix File ".../.local/lib/python3.8/site-packages/sctransfer/io.py", line 6, in import scanpy.api as sc File ".../.local/lib/python3.8/site-packages/scanpy/api/init.py", line 27, in from . import pl File ".../.local/lib/python3.8/site-packages/scanpy/api/pl.py", line 1, in from ..plotting._anndata import scatter, violin, ranking, clustermap, stacked

I guess the problem was caused by scanpy: SAVERX use old version of scanpy which included stacked_violin function, but latest version of scanpy(v1.6.0) does not include that function.

jingshuw commented 3 years ago

Thanks for pointing this out. I'll update the code to fit the new scanpy version

zyzyzyzyh commented 2 years ago

Having the same issue here: Error in py_module_import(module, convert = convert) : ModuleNotFoundError: No module named 'scanpy.api'

Looks like there is no scanpy.api module anymore.

With this error I could not run the saverx() function.