Coder Social home page Coder Social logo

saverx's People

Contributors

jingshuw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

saverx's Issues

Error: ModuleNotFoundError: No module named 'sctransfer'

I'm encountering the error Error: ModuleNotFoundError: No module named 'sctransfer' whenever I try to run saverx. I tried the solution in #15, but it also didn't work for me. I can see the sctransfer module in Users/tina/Library/Python/3.7/lib/python/sitepackages, but from py_config() I can see that the python being used is /Users/tina/Library/r-miniconda/envs/r-reticulate/bin/python. I tried to set the python path used using these commands

path_to_python <- "Users/tina/Library/Python/3.7"
use_python(path_to_python)

but it hasn't worked for me. Would greatly appreciate any advice on how to get around this, thanks!

process the data

In UMI data, how to process the data to make it fit SAVERX when using the pretrained model? For some raw UMI data, it seems hard to use it and the error is that : no gene name mathces..
Thank you!

Recommended workflow for multiple samples

Hi again,

I wonder what your recommendations are for using SAVERX with multiple samples. In my work I integrate > 20 samples using Seurat V3 to identify overarching cell clusters. If I want to use SAVERX on these samples, would you recommend to

a) integrate the data and run SAVERX on the integrated data (probably not, since UMI count data is lost on the way)
b) run SAVERX on one big matrix with UMI counts from all cells of all samples
c) run SAVERX on the UMI counts of each sample separately and integrate the resulting data using Seurat?

Or is there another way altogether?

Thanks for your help and thanks again for developing this!

Best Max

Error in py_module_import(module, convert = convert) : ImportError: cannot import name 'getargspec_no_self' from 'scipy._lib._util'

Just installed SAVERX and ran into this error message in the example.

# install_github("jingshuw/SAVERX")
library(SAVERX)
library(reticulate)
reticulate::use_condaenv("/opt/anaconda3/envs/echoR")
reticulate::use_python("/opt/anaconda3/envs/echoR/bin/python3.7")
reticulate::py_install("sctransfer", pip = T)

 file <- saverx("~/Downloads/shekhar_downsampled.csv")
[1] "Input file is: ~/Downloads/shekhar_downsampled.csv"
[1] "Use a pretrained model: No"
[1] "Processed file saved as: 1613680966.07345/tmpdata.rds"
[1] "Data preprocessed ..."
Error in py_module_import(module, convert = convert) : 
  ImportError: cannot import name 'getargspec_no_self' from 'scipy._lib._util' (/opt/anaconda3/envs/echoR/lib/python3.7/site-packages/scipy/_lib/_util.py)
> 

Thanks!,
Brian

Conda env

⋊> ~/D/model_celltype_conservation on main ⨯ conda list             (echoR) 20:43:33
# packages in environment at /opt/anaconda3/envs/echoR:
#
# Name                    Version                   Build  Channel
_r-mutex                  1.0.0               anacondar_1  
absl-py                   0.11.0                   pypi_0    pypi
anndata                   0.7.5            py37hf985489_0    conda-forge
arrow-cpp                 0.15.1           py37hb41def8_6  
astunparse                1.6.3                    pypi_0    pypi
attrs                     20.3.0             pyhd3eb1b0_0  
bcftools                  1.10.2               h27336cd_0    bioconda
bioconductor-annotationdbi 1.48.0                    r36_0    bioconda
bioconductor-annotationfilter 1.10.0                    r36_0    bioconda
bioconductor-biobase      2.46.0            r36h01d97ff_0    bioconda
bioconductor-biocfilecache 1.10.0                    r36_0    bioconda
bioconductor-biocgenerics 0.32.0                    r36_0    bioconda
bioconductor-biocparallel 1.20.0            r36h6de7cb9_0    bioconda
bioconductor-biomart      2.42.0                    r36_0    bioconda
bioconductor-biostrings   2.54.0            r36h01d97ff_0    bioconda
bioconductor-biovizbase   1.34.0            r36h01d97ff_0    bioconda
bioconductor-bsgenome     1.54.0                    r36_0    bioconda
bioconductor-delayedarray 0.12.0            r36h01d97ff_0    bioconda
bioconductor-ensdb.hsapiens.v75 2.99.0                    r36_6    bioconda
bioconductor-ensembldb    2.10.0                    r36_0    bioconda
bioconductor-genomeinfodb 1.22.0                    r36_0    bioconda
bioconductor-genomeinfodbdata 1.2.2                     r36_0    bioconda
bioconductor-genomicalignments 1.22.0            r36h01d97ff_0    bioconda
bioconductor-genomicfeatures 1.38.0                    r36_0    bioconda
bioconductor-genomicranges 1.38.0            r36h01d97ff_0    bioconda
bioconductor-ggbio        1.34.0                    r36_0    bioconda
bioconductor-graph        1.64.0            r36h01d97ff_0    bioconda
bioconductor-iranges      2.20.0            r36h01d97ff_0    bioconda
bioconductor-organismdbi  1.28.0                    r36_0    bioconda
bioconductor-protgenerics 1.18.0                    r36_0    bioconda
bioconductor-rbgl         1.62.1            r36h6de7cb9_0    bioconda
bioconductor-rgraphviz    2.30.0            r36h6de7cb9_0    bioconda
bioconductor-rhtslib      1.18.0            r36h90b7f41_1    bioconda
bioconductor-rsamtools    2.2.0             r36h6de7cb9_0    bioconda
bioconductor-rtracklayer  1.46.0            r36h01d97ff_0    bioconda
bioconductor-s4vectors    0.24.0            r36h01d97ff_0    bioconda
bioconductor-snpstats     1.36.0            r36h01d97ff_0    bioconda
bioconductor-summarizedexperiment 1.16.0                    r36_0    bioconda
bioconductor-suprahex     1.24.0                    r36_0    bioconda
bioconductor-variantannotation 1.32.0            r36h01d97ff_0    bioconda
bioconductor-xvector      0.26.0            r36h01d97ff_0    bioconda
bioconductor-zlibbioc     1.32.0            r36h01d97ff_0    bioconda
bitarray                  1.6.1            py37h9ed2024_0  
blas                      2.11                   openblas    conda-forge
bokeh                     2.2.3                    py37_0  
boost-cpp                 1.67.0               h1de35cc_4  
brotli                    1.0.9                hb1e8313_2  
brotlipy                  0.7.0           py37h9ed2024_1003  
bwidget                   1.9.11                        1  
bzip2                     1.0.8                h1de35cc_0  
c-ares                    1.16.1               haf1e3a3_0  
ca-certificates           2020.12.5            h033912b_0    conda-forge
cachetools                4.2.1                    pypi_0    pypi
cairo                     1.16.0            h0ab9d94_1001    conda-forge
certifi                   2020.12.5        py37hf985489_1    conda-forge
cffi                      1.14.3           py37h2125817_2  
chardet                   3.0.4           py37hecd8cb5_1003  
clang                     10.0.0          default_hf57f61e_0  
clang_osx-64              4.0.1               h1ce6c1d_16    anaconda
clangxx                   10.0.0          default_hf57f61e_0  
clangxx_osx-64            4.0.1               h22b1bf0_16  
click                     7.1.2                      py_0  
cloudpickle               1.6.0                      py_0  
cryptography              3.2.1            py37hbcfaee0_1  
curl                      7.67.0               ha441bb4_0  
cycler                    0.10.0                   pypi_0    pypi
cytoolz                   0.11.0           py37haf1e3a3_0  
dask                      2.30.0                     py_0  
dask-core                 2.30.0                     py_0  
decorator                 4.4.2                      py_0  
deprecated                1.2.10                     py_0  
distributed               2.30.1           py37hecd8cb5_0  
double-conversion         3.1.5                haf313ee_1  
fastparquet               0.4.1            py37hf1fa96c_0  
flatbuffers               1.12                     pypi_0    pypi
fontconfig                2.13.1            h1027ab8_1000    conda-forge
freetype                  2.10.4               ha233b18_0  
fsspec                    0.8.3                      py_0  
gast                      0.3.3                    pypi_0    pypi
get-version               2.1                      pypi_0    pypi
gettext                   0.19.8.1             hb0f4f8b_2  
gflags                    2.2.2                h0a44026_0  
gfortran_osx-64           4.8.5                h22b1bf0_8  
glib                      2.66.1               h9bbe63b_0  
glog                      0.4.0                h0a44026_0  
google-auth               1.27.0                   pypi_0    pypi
google-auth-oauthlib      0.4.2                    pypi_0    pypi
google-pasta              0.2.0                    pypi_0    pypi
graphite2                 1.3.14               h38d11af_0  
grpc-cpp                  1.26.0               h044775b_0  
grpcio                    1.32.0                   pypi_0    pypi
gsl                       2.5                  ha2d443c_1    conda-forge
h5py                      2.10.0          nompi_py37h106b333_102    conda-forge
harfbuzz                  2.4.0                h831d699_1  
hdf5                      1.10.5          nompi_h0cbb7df_1103    conda-forge
heapdict                  1.0.1                      py_0  
htslib                    1.10.2               h862b14c_0    bioconda
icu                       58.2                 h0a44026_3  
idna                      2.10                       py_0  
importlib-metadata        2.0.0                      py_1  
importlib_metadata        2.0.0                         1  
iniconfig                 1.1.1                      py_0  
jinja2                    2.11.2                     py_0  
joblib                    0.17.0                     py_0  
jpeg                      9d                   hbcb3906_0    conda-forge
keras                     2.4.3                    pypi_0    pypi
keras-preprocessing       1.1.2                    pypi_0    pypi
kiwisolver                1.3.1                    pypi_0    pypi
krb5                      1.16.4               hddcf347_0  
lcms2                     2.11                 h92f6f08_0  
legacy-api-wrap           1.2                      pypi_0    pypi
libblas                   3.8.0               11_openblas    conda-forge
libboost                  1.67.0               hebc422b_4  
libcblas                  3.8.0               11_openblas    conda-forge
libcurl                   7.67.0               h051b688_0  
libcxx                    10.0.0                        1  
libdeflate                1.3                  h01d97ff_0    conda-forge
libedit                   3.1.20191231         h1de35cc_1  
libevent                  2.1.8                hddc9c9b_1  
libffi                    3.3                  hb1e8313_2  
libgfortran               3.0.1                h93005f0_2  
libiconv                  1.16                 h1de35cc_0  
liblapack                 3.8.0               11_openblas    conda-forge
liblapacke                3.8.0               11_openblas    conda-forge
libllvm10                 10.0.1               h76017ad_5  
libopenblas               0.3.6                hdc02c5d_2  
libpng                    1.6.37               ha441bb4_0  
libprotobuf               3.11.2               hd9629dc_0  
libssh2                   1.9.0                ha12b0ac_1  
libtiff                   4.1.0                hcb84e12_0  
libxml2                   2.9.10               h7cdb67c_3  
llvm-openmp               10.0.0               h28b9765_0  
llvmlite                  0.34.0           py37h739e7dc_4  
locket                    0.2.0                    py37_1  
lz4-c                     1.8.1.2              h1de35cc_0  
macs2                     2.2.7.1          py37hea0d0e9_1    bioconda
make                      4.2.1                h3efe00b_1  
markdown                  3.3.3                    pypi_0    pypi
markupsafe                1.1.1            py37h1de35cc_0  
matplotlib                3.3.4                    pypi_0    pypi
more-itertools            8.6.0              pyhd3eb1b0_0  
msgpack-python            1.0.0            py37h04f5b5a_1  
natsort                   7.1.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.2                  h0a44026_1  
networkx                  2.5                        py_0  
numba                     0.51.2           py37h959d312_1  
numexpr                   2.7.2                    pypi_0    pypi
numpy                     1.19.2           py37h63973fd_0  
numpy-base                1.19.2           py37h68fea81_0  
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                     py37_0  
openssl                   1.1.1j               hbcf498f_0    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
packaging                 20.4                       py_0  
pandas                    1.1.3            py37hb1e8313_0  
pandas-plink              2.2.3            py37he6e4e01_0    conda-forge
pango                     1.40.14           h0da9b22_1005    conda-forge
partd                     1.1.0                      py_0  
patsy                     0.5.1                    pypi_0    pypi
pcre                      8.44                 hb1e8313_0  
perl                      5.26.2               h4e221da_0  
pillow                    8.0.1            py37h5270095_0  
pip                       20.2.4           py37hecd8cb5_0  
pixman                    0.38.0               h1de35cc_0  
plink                     1.90b6.18            h0b31af3_0    bioconda
pluggy                    0.13.1                   py37_0  
protobuf                  3.14.0                   pypi_0    pypi
psutil                    5.7.2            py37haf1e3a3_0  
py                        1.9.0                      py_0  
pyarrow                   0.15.1           py37h6c726b0_0  
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pycparser                 2.20                       py_2  
pynndescent               0.5.2                    pypi_0    pypi
pyopenssl                 19.1.0             pyhd3eb1b0_1  
pyparsing                 2.4.7                      py_0  
pysocks                   1.7.1            py37hecd8cb5_0  
pytest                    6.1.1                    py37_0  
python                    3.7.9                h26836e1_0  
python-dateutil           2.8.1                      py_0  
python_abi                3.7                     1_cp37m    conda-forge
pytz                      2020.1                     py_0  
pyyaml                    5.3.1            py37haf1e3a3_1  
r                         3.6.0                     r36_0  
r-acepack                 1.4.1             r36hfffe0aa_0  
r-ape                     5.3               r36h466af19_0  
r-askpass                 1.0               r36h1de35cc_0  
r-assertthat              0.2.1             r36h6115d3f_0  
r-backports               1.1.4             r36h46e59ec_0  
r-base                    3.6.1                h577800e_2    conda-forge
r-base64enc               0.1_3             r36h46e59ec_4  
r-bh                      1.69.0_1          r36h6115d3f_0  
r-biocmanager             1.30.4            r36h6115d3f_0  
r-bit                     1.1_14            r36h46e59ec_0  
r-bit64                   0.9_7             r36h46e59ec_0  
r-bitops                  1.0_6             r36h46e59ec_4  
r-blob                    1.1.1             r36h6115d3f_0  
r-bma                     3.18.9            r36haf69682_2    conda-forge
r-boot                    1.3_20            r36h6115d3f_0  
r-broom                   0.5.2             r36h6115d3f_0  
r-callr                   3.2.0             r36h6115d3f_0  
r-cellranger              1.1.0             r36h6115d3f_0  
r-checkmate               1.9.1             r36h46e59ec_0  
r-ckmeans.1d.dp           4.2.2             r36h466af19_0  
r-class                   7.3_15            r36h46e59ec_0  
r-cli                     1.1.0             r36h6115d3f_0  
r-clipr                   0.6.0             r36h6115d3f_0  
r-clisymbols              1.2.0             r36h6115d3f_0  
r-cluster                 2.0.8             r36hfffe0aa_0  
r-coda                    0.19_2            r36h6115d3f_0  
r-codetools               0.2_16            r36h6115d3f_0  
r-coloc                   3.1               r36h6115d3f_2    bioconda
r-colorspace              1.4_1             r36h46e59ec_0  
r-crayon                  1.3.4             r36h6115d3f_0  
r-curl                    3.3               r36h46e59ec_0  
r-data.table              1.12.2            r36h46e59ec_0  
r-dbi                     1.0.0             r36h6115d3f_0  
r-dbplyr                  1.4.0             r36h6115d3f_0  
r-deoptimr                1.0_8             r36h6115d3f_0  
r-deriv                   3.8.5             r36h6115d3f_0  
r-desc                    1.2.0             r36h6115d3f_0  
r-desctools               0.99.29           r36hb1f44f5_0    conda-forge
r-devtools                2.0.2             r36h6115d3f_0  
r-dichromat               2.0_0             r36h6115d3f_4  
r-digest                  0.6.18            r36h46e59ec_0  
r-dnet                    1.1.7             r36h6115d3f_0    bioconda
r-doby                    4.6.6             r36h6115d3f_0    conda-forge
r-dplyr                   0.8.0.1           r36h466af19_0  
r-ellipsis                0.1.0             r36h46e59ec_0  
r-evaluate                0.13              r36h6115d3f_0  
r-exact                   1.7               r36h6115d3f_0  
r-expm                    0.999_4           r36hfffe0aa_0  
r-fansi                   0.4.0             r36h46e59ec_0  
r-flashclust              1.01_2            r36hfffe0aa_0  
r-forcats                 0.4.0             r36h6115d3f_0  
r-foreign                 0.8_71            r36h46e59ec_0  
r-formatr                 1.6               r36h6115d3f_0  
r-formula                 1.2_3             r36h6115d3f_0  
r-fs                      1.2.7             r36h466af19_0  
r-futile.logger           1.4.3            r342ha88a2a2_1    biobuilds
r-futile.options          1.0.1             r36h6115d3f_0  
r-generics                0.0.2             r36h6115d3f_0  
r-ggally                  2.0.0             r36h6115d3f_0    conda-forge
r-ggnetwork               0.5.8             r36h6115d3f_1    conda-forge
r-ggplot2                 3.1.1             r36h6115d3f_0  
r-ggrepel                 0.8.2             r36hc5da6b9_1    conda-forge
r-gh                      1.0.1             r36h6115d3f_0  
r-git2r                   0.25.2            r36h46e59ec_0  
r-glue                    1.3.1             r36h46e59ec_0  
r-gridextra               2.3               r36h6115d3f_0  
r-gtable                  0.3.0             r36h6115d3f_0  
r-haven                   2.1.0             r36h466af19_0  
r-hexbin                  1.27.2            r36hfffe0aa_0  
r-highr                   0.8               r36h6115d3f_0  
r-hmisc                   4.2_0             r36hfffe0aa_0  
r-hms                     0.4.2             r36h6115d3f_0  
r-htmltable               1.13.1            r36h6115d3f_0  
r-htmltools               0.3.6             r36h466af19_0  
r-htmlwidgets             1.3               r36h6115d3f_0  
r-httr                    1.4.0             r36h6115d3f_0  
r-igraph                  1.2.4.1           r36hbe7ee20_0  
r-ini                     0.3.1             r36h6115d3f_0  
r-inline                  0.3.15            r36h6115d3f_0  
r-jsonlite                1.6               r36h46e59ec_0  
r-kernsmooth              2.23_15           r36hfffe0aa_4  
r-knitr                   1.22              r36h6115d3f_0  
r-labeling                0.3               r36h6115d3f_4  
r-lambda.r                1.2.3             r36h6115d3f_0  
r-lattice                 0.20_38           r36h46e59ec_0  
r-latticeextra            0.6_28            r36h6115d3f_0  
r-lazyeval                0.2.2             r36h46e59ec_0  
r-leaps                   3.0               r36hfffe0aa_0  
r-lme4                    1.1_21            r36h466af19_0  
r-lubridate               1.7.4             r36h466af19_0  
r-magrittr                1.5               r36h6115d3f_4  
r-manipulate              1.0.1             r36h6115d3f_4  
r-markdown                0.9               r36h46e59ec_0  
r-mass                    7.3_51.3          r36h46e59ec_0  
r-matrix                  1.2_17            r36h46e59ec_0  
r-matrixstats             0.54.0            r36h46e59ec_0  
r-memoise                 1.1.0             r36h6115d3f_0  
r-mgcv                    1.8_28            r36h46e59ec_0  
r-mime                    0.6               r36h46e59ec_0  
r-minqa                   1.2.4             r36hbe7ee20_4  
r-modelr                  0.1.4             r36h6115d3f_0  
r-munsell                 0.5.0             r36h6115d3f_0  
r-mvtnorm                 1.0_10            r36hfffe0aa_0  
r-network                 1.16.0            r36h17f1fa6_1    conda-forge
r-nlme                    3.1_139           r36hfffe0aa_0  
r-nloptr                  1.2.1             r36hbe7ee20_0  
r-nnet                    7.3_12            r36h46e59ec_0  
r-openssl                 1.3               r36h46e59ec_0  
r-pbkrtest                0.4_7             r36h6115d3f_0  
r-pcapp                   1.9_73            r36h466af19_0  
r-pillar                  1.3.1             r36h6115d3f_0  
r-pkgbuild                1.0.3             r36h6115d3f_0  
r-pkgconfig               2.0.2             r36h6115d3f_0  
r-pkgload                 1.0.2             r36h466af19_0  
r-plogr                   0.2.0             r36h6115d3f_0  
r-plyr                    1.8.4             r36h466af19_0  
r-prettyunits             1.0.2             r36h6115d3f_0  
r-processx                3.3.0             r36h46e59ec_0  
r-progress                1.2.0             r36h6115d3f_0  
r-ps                      1.3.0             r36h46e59ec_0  
r-purrr                   0.3.2             r36h46e59ec_0  
r-r6                      2.4.0             r36h6115d3f_0  
r-rappdirs                0.3.1             r36h46e59ec_0  
r-rcircos                 1.2.1             r36h6115d3f_0  
r-rcmdcheck               1.3.2             r36h6115d3f_0  
r-rcolorbrewer            1.1_2             r36h6115d3f_0  
r-rcpp                    1.0.1             r36h466af19_0  
r-rcppeigen               0.3.3.5.0         r36h466af19_0  
r-rcurl                   1.95_4.12         r36h46e59ec_0  
r-readr                   1.3.1             r36h466af19_0  
r-readxl                  1.3.1             r36h466af19_0  
r-recommended             3.6.0                     r36_0  
r-refgenome               1.7.7             r36hc5da6b9_2    conda-forge
r-rematch                 1.0.1             r36h6115d3f_0  
r-remotes                 2.0.4             r36h6115d3f_0  
r-reprex                  0.2.1             r36h6115d3f_0  
r-reshape                 0.8.8             r36h6115d3f_0  
r-reshape2                1.4.3             r36h466af19_0  
r-reticulate              1.12              r36h466af19_0  
r-rlang                   0.3.4             r36h46e59ec_0  
r-rle                     0.9.2             r36hb5ad454_0    conda-forge
r-rmarkdown               1.12              r36h6115d3f_0  
r-robustbase              0.93_4            r36hfffe0aa_0  
r-rpart                   4.1_15            r36h46e59ec_0  
r-rprojroot               1.3_2             r36h6115d3f_0  
r-rrcov                   1.4_7             r36haf69682_2    conda-forge
r-rsqlite                 2.1.1             r36h466af19_0  
r-rstudioapi              0.10              r36h6115d3f_0  
r-rvest                   0.3.3             r36h6115d3f_0  
r-scales                  1.0.0             r36h466af19_0  
r-selectr                 0.4_1             r36h6115d3f_0  
r-sessioninfo             1.1.1             r36h6115d3f_0  
r-sna                     2.5               r36h17f1fa6_1    conda-forge
r-snow                    0.4_3             r36h6115d3f_0  
r-spatial                 7.3_11            r36h46e59ec_4  
r-speedglm                0.3_2             r36h6115d3f_0  
r-statnet.common          4.4.1             r36hb5ad454_0    conda-forge
r-stringi                 1.4.3             r36h466af19_0  
r-stringr                 1.4.0             r36h6115d3f_0  
r-survival                2.44_1.1          r36h46e59ec_0  
r-sys                     3.2               r36h46e59ec_0  
r-tibble                  2.1.1             r36h46e59ec_0  
r-tidyr                   0.8.3             r36h466af19_0  
r-tidyselect              0.2.5             r36h466af19_0  
r-tidyverse               1.2.1             r36h6115d3f_0  
r-tinytex                 0.12              r36h6115d3f_0  
r-usethis                 1.5.0             r36h6115d3f_0  
r-utf8                    1.1.4             r36h46e59ec_0  
r-viridis                 0.5.1             r36h6115d3f_0  
r-viridislite             0.3.0             r36h6115d3f_0  
r-whisker                 0.3_2             r36h6115d3f_4  
r-withr                   2.1.2             r36h6115d3f_0  
r-xfun                    0.6               r36h6115d3f_0  
r-xgr                     1.1.7             r36h6115d3f_0    bioconda
r-xml                     3.98_1.19         r36h46e59ec_0  
r-xml2                    1.2.0             r36h466af19_0  
r-xopen                   1.0.0             r36h6115d3f_0  
r-yaml                    2.2.0             r36h46e59ec_0  
re2                       2019.08.01           h0a44026_0  
readline                  8.0                  h1de35cc_0  
requests                  2.24.0                     py_0  
requests-oauthlib         1.3.0                    pypi_0    pypi
rpy2                      2.9.4           py37r36h1d22016_0  
rsa                       4.7.1                    pypi_0    pypi
scanpy                    1.7.0                    pypi_0    pypi
scikit-learn              0.23.2           py37h959d312_0  
scipy                     1.2.1            py37hbd7caa9_1    conda-forge
sctransfer                0.0.9                    pypi_0    pypi
seaborn                   0.11.1                   pypi_0    pypi
setuptools                50.3.1           py37hecd8cb5_1  
sinfo                     0.3.1                    pypi_0    pypi
six                       1.15.0           py37hecd8cb5_0  
snappy                    1.1.8                hb1e8313_0  
sortedcontainers          2.2.2                      py_0  
sqlite                    3.33.0               hffcf06c_0  
statsmodels               0.12.2                   pypi_0    pypi
stdlib-list               0.8.0                    pypi_0    pypi
tabix                     0.2.6                ha92aebf_0    bioconda
tables                    3.6.1                    pypi_0    pypi
tblib                     1.7.0                      py_0  
tensorboard               2.4.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.0                    pypi_0    pypi
tensorflow                2.4.1                    pypi_0    pypi
tensorflow-estimator      2.4.0                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
threadpoolctl             2.1.0              pyh5ca1d4c_0  
thrift                    0.11.0           py37h0a44026_0  
thrift-cpp                0.11.0               hd79cdb6_3  
tk                        8.6.10               hb0a8c7a_0  
tktable                   2.10                 h1de35cc_0  
toml                      0.10.1                     py_0  
toolz                     0.11.1                     py_0  
tornado                   6.0.4            py37h1de35cc_1  
tqdm                      4.51.0             pyhd3eb1b0_0  
typing_extensions         3.7.4.3                    py_0  
umap-learn                0.5.1                    pypi_0    pypi
uriparser                 0.9.3                h0a44026_1  
urllib3                   1.25.11                    py_0  
werkzeug                  1.0.1                    pypi_0    pypi
wget                      1.20.1               h051b688_0  
wheel                     0.35.1             pyhd3eb1b0_0  
wrapt                     1.12.1           py37h1de35cc_1  
xarray                    0.16.1                     py_0  
xz                        5.2.5                h1de35cc_0  
yaml                      0.2.5                haf1e3a3_0  
zict                      2.0.0                      py_0  
zipp                      3.4.0              pyhd3eb1b0_0  
zlib                      1.2.11               h1de35cc_3  
zstandard                 0.14.1           py37h23ab428_0  
zstd                      1.3.7                h5bba6e5_0  

R Session Info

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] reticulate_1.18             SAVERX_1.0.2                SeuratObject_4.0.0         
 [4] Seurat_4.0.0                SummarizedExperiment_1.20.0 Biobase_2.50.0             
 [7] GenomicRanges_1.42.0        GenomeInfoDb_1.26.2         IRanges_2.24.1             
[10] S4Vectors_0.28.1            BiocGenerics_0.36.0         MatrixGenerics_1.2.1       
[13] matrixStats_0.58.0          dplyr_1.0.4                

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3                           rtracklayer_1.50.0                      
  [3] scattermore_0.7                          ggthemes_4.2.4                          
  [5] R.methodsS3_1.8.1                        tidyr_1.1.2                             
  [7] knitr_1.31                               ggplot2_3.3.3                           
  [9] bit64_4.0.5                              R.utils_2.10.1                          
 [11] irlba_2.3.3                              DelayedArray_0.16.1                     
 [13] data.table_1.13.6                        rpart_4.1-15                            
 [15] RCurl_1.98-1.2                           generics_0.1.0                          
 [17] callr_3.5.1                              cowplot_1.1.1                           
 [19] usethis_2.0.1                            RSQLite_2.2.3                           
 [21] RANN_2.6.1                               proxy_0.4-24                            
 [23] future_1.21.0                            bit_4.0.4                               
 [25] spatstat.data_2.0-0                      webshot_0.5.2                           
 [27] xml2_1.3.2                               httpuv_1.5.5                            
 [29] assertthat_0.2.1                         viridis_0.5.1                           
 [31] xfun_0.21                                One2One_0.1.0                           
 [33] hms_1.0.0                                evaluate_0.14                           
 [35] promises_1.2.0.1                         TSP_1.1-10                              
 [37] DEoptimR_1.0-8                           progress_1.2.2                          
 [39] caTools_1.18.1                           dendextend_1.14.0                       
 [41] dbplyr_2.1.0                             readxl_1.3.1                            
 [43] igraph_1.2.6                             DBI_1.1.1                               
 [45] htmlwidgets_1.5.3                        purrr_0.3.4                             
 [47] ellipsis_0.3.1                           RSpectra_0.16-0                         
 [49] biomaRt_2.46.3                           deldir_0.2-9                            
 [51] vctrs_0.3.6                              SingleCellExperiment_1.12.0             
 [53] remotes_2.2.0                            here_1.0.1                              
 [55] TTR_0.24.2                               ROCR_1.0-11                             
 [57] abind_1.4-5                              cachem_1.0.3                            
 [59] RcppEigen_0.3.3.9.1                      withr_2.4.1                             
 [61] BSgenome_1.58.0                          robustbase_0.93-7                       
 [63] vcd_1.4-8                                sctransform_0.3.2                       
 [65] GenomicAlignments_1.26.0                 xts_0.12.1                              
 [67] prettyunits_1.1.1                        goftest_1.2-2                           
 [69] cluster_2.1.0                            repmis_0.5                              
 [71] ape_5.4-1                                lazyeval_0.2.2                          
 [73] laeken_0.5.1                             crayon_1.4.1                            
 [75] pkgconfig_2.0.3                          nlme_3.1-152                            
 [77] pkgload_1.1.0                            seriation_1.2-9                         
 [79] pals_1.6                                 nnet_7.3-15                             
 [81] devtools_2.3.2                           rlang_0.4.10                            
 [83] globals_0.14.0                           lifecycle_1.0.0                         
 [85] miniUI_0.1.1.1                           SNPlocs.Hsapiens.dbSNP144.GRCh37_0.99.20
 [87] registry_0.5-1                           SNPlocs.Hsapiens.dbSNP144.GRCh38_0.99.20
 [89] BiocFileCache_1.14.0                     dichromat_2.0-0                         
 [91] cellranger_1.1.0                         rprojroot_2.0.2                         
 [93] polyclip_1.10-0                          RcppHNSW_0.3.0                          
 [95] lmtest_0.9-38                            Matrix_1.3-2                            
 [97] carData_3.0-4                            Rhdf5lib_1.12.1                         
 [99] boot_1.3-27                              zoo_1.8-8                               
[101] ggridges_0.5.3                           processx_3.4.5                          
[103] png_0.1-7                                viridisLite_0.3.0                       
[105] bitops_1.0-6                             R.oo_1.24.0                             
[107] rhdf5filters_1.2.0                       KernSmooth_2.23-18                      
[109] Biostrings_2.58.0                        anndata_0.7.5.1                         
[111] blob_1.2.1                               stringr_1.4.0                           
[113] parallelly_1.23.0                        R.cache_0.14.0                          
[115] MAGMA.Celltyping_1.0.0                   scales_1.1.1                            
[117] memoise_2.0.0                            magrittr_2.0.1                          
[119] plyr_1.8.6                               hexbin_1.28.2                           
[121] ica_1.0-2                                gplots_3.1.1                            
[123] zlibbioc_1.36.0                          compiler_4.0.3                          
[125] RColorBrewer_1.1-2                       pcaMethods_1.82.0                       
[127] fitdistrplus_1.1-3                       Rsamtools_2.6.0                         
[129] homologene_1.4.68.19.3.27                cli_2.3.0                               
[131] XVector_0.30.0                           listenv_0.8.0                           
[133] patchwork_1.1.0.9000                     pbapply_1.4-3                           
[135] ps_1.5.0                                 ggplot.multistats_1.0.0                 
[137] MASS_7.3-53.1                            mgcv_1.8-33                             
[139] tidyselect_1.1.0                         stringi_1.5.3                           
[141] forcats_0.5.1                            yaml_2.2.1                              
[143] askpass_1.1                              ggrepel_0.9.1                           
[145] grid_4.0.3                               tools_4.0.3                             
[147] future.apply_1.7.0                       rio_0.5.16                              
[149] rstudioapi_0.13                          RNOmni_1.0.0                            
[151] foreach_1.5.1                            foreign_0.8-81                          
[153] gridExtra_2.3                            smoother_1.1                            
[155] scatterplot3d_0.3-41                     Rtsne_0.15                              
[157] HGNChelper_0.8.1                         digest_0.6.27                           
[159] shiny_1.6.0                              Rcpp_1.0.6                              
[161] car_3.0-10                               later_1.1.0.1                           
[163] RcppAnnoy_0.0.18                         httr_1.4.2                              
[165] ggdendro_0.1.22                          AnnotationDbi_1.52.0                    
[167] colorspace_2.0-0                         XML_3.99-0.5                            
[169] fs_1.5.0                                 tensor_1.5                              
[171] ranger_0.12.1                            splines_4.0.3                           
[173] uwot_0.1.10                              spatstat.utils_2.0-0                    
[175] sp_1.4-5                                 mapproj_1.2.7                           
[177] plotly_4.9.3                             sessioninfo_1.1.1                       
[179] xtable_1.8-4                             jsonlite_1.7.2                          
[181] heatmaply_1.2.1                          spatstat_1.64-1                         
[183] sceasy_0.0.6                             testthat_3.0.2                          
[185] destiny_3.4.0                            R6_2.5.0                                
[187] EWCE_0.99.2                              pillar_1.4.7                            
[189] htmltools_0.5.1.1                        mime_0.10                               
[191] BiocParallel_1.24.1                      glue_1.4.2                              
[193] fastmap_1.1.0                            VIM_6.1.0                               
[195] class_7.3-18                             codetools_0.2-18                        
[197] maps_3.3.0                               pkgbuild_1.2.0                          
[199] lattice_0.20-41                          tibble_3.0.6                            
[201] curl_4.3                                 leiden_0.3.7                            
[203] gtools_3.8.2                             zip_2.1.1                               
[205] openxlsx_4.2.3                           openssl_1.4.3                           
[207] survival_3.2-7                           limma_3.46.0                            
[209] rmarkdown_2.6                            desc_1.2.0                              
[211] munsell_0.5.0                            e1071_1.7-4                             
[213] rhdf5_2.34.0                             GenomeInfoDbData_1.2.4                  
[215] iterators_1.0.13                         HDF5Array_1.18.1                        
[217] haven_2.3.1                              reshape2_1.4.4                          
[219] gtable_0.3.0     

Error in importing sctransfer

Hi,

When running the example file <- saverx("./testdata/shekhar_downsampled.csv"), I encountered the error saying

Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'sctransfer'

I know there is a related post here, #15. I tried its solution, but it didn't work for me.

My Python version is Python 3.8.5, and I double-checked that sctransfer has been installed:

Name: sctransfer
Version: 0.0.9
Summary: Python part for scRNA-seq transfer learning denoising tool SAVER-X
Home-page: https://github.com/jingshuw/sctransfer
Author: Jingshu Wang
Author-email: [email protected]
License: GPL-3
Location: /Users/zhli12/miniconda3/lib/python3.8/site-packages
Requires: pandas, anndata, scikit-learn, numpy, h5py, six, keras, scanpy, tensorflow

Based on its installation location, I also tried the command

path_to_python <- "Users/zhli12/miniconda3/lib/python3.8"
use_python(path_to_python)

However, the same error persists.

Does anyone know how to fix this problem? Thank you!!

Error in 'scanpy.api'

I meet the 'scanpy.api' error when I run SAVERX on my own samples

[1] "Input is a data matrix"
[1] "Use a pretrained model: Yes"
[1] "Data species is: Human"
[1] "Pretrained weights file is: ./human_Tcells.hdf5"
[1] "Model species is: Human"
[1] "8850 genes mapped out of 9069"
[1] "Gene names mapped, resulting file saved as: 1680935433.67681/tmpdata.rds"
[1] "Reshaped file saved as: 1680935433.67681/tmpdata.mtx"
[1] "Nonmissing indicator saved as: 1680935433.67681/tmpdata_nonmissing.txt"
[1] "Data preprocessed ..."
Error: ModuleNotFoundError: No module named 'scanpy.api'

Seems the 06/13/2022 update dosen't work
What could I do with this error

Input library-size-normalized expression

Hi,

Thank you for developing SAVERX. I am trying to impute multiple-sample single-cell UMI data using SAVERX. In order to make the gene expression comparable across samples, I have already normalized the UMI by library size. Now I want to impute the cells of each individual sample separately using these library-size-normalized expression, but SAVERX paper states that the input is UMI count. May I know whether we could input library-size-normalized expression to SAVERX, and how that would affect the imputation performance compared to using original UMI count?

Thank you!
Winnie

Denoised matrix contains NaN

Hey,

I ran SAVERX on my data and am quite happy with the results. However I noticed, that the denoised matrix contains NaN for some genes (but not all cells for these gene). It's a bit unclear to me what this means and can get clumsy to work with downstream. Can you explain?

Best Max

input/output as matrix instead of path to file

Hi,
Is it possible to set the input and output as matrices within R environment instead of path to file, just like SAVER? I'd like to incorporate SAVERX as part of a pipeline in the future and path to file is quite inconvenient.
Thanks!

Request for a worked python environment for SAVERX

I have tried lots of python packages' version, but it always show a misssing for some python modules or functions. So I hope author could share the environment used by building it into docker image, releasing a requirements.txt or environments.yml. Besides, I found the SAVER-X server is uavailale to create a new account with a backend database error.

Error in py_module_import

Hi, I am running SAVERX with Rstudio, R3.6.2 under Ubuntu 16.04 and a Python 3.5 virtual environment with the sctransfer package v0.0.9. No error messages loading SAVERX or installing the python dependencies but I get this while running SAVERX:

> library("SAVERX")
> scFile <- saverx("./rawcounts.rds")
[1] "Input file is: ./rawcounts.rds"
[1] "Use a pretrained model: No"
[1] "Processed file saved as: 1582598887.77262/tmpdata.rds"
[1] "Data preprocessed ..."
Error in py_module_import(module, convert = convert) : 
  SyntaxError: invalid syntax (_settings.py, line 351)

Python packages available:

Package              Version   
-------------------- ----------
absl-py              0.9.0     
anndata              0.6.20    
astor                0.8.1     
cachetools           4.0.0     
certifi              2019.11.28
chardet              3.0.4     
cTPnet               0.2.6     
cycler               0.10.0    
decorator            4.4.1     
gast                 0.2.2     
google-auth          1.11.2    
google-auth-oauthlib 0.4.1     
google-pasta         0.1.8     
grpcio               1.27.2    
h5py                 2.10.0    
idna                 2.9       
joblib               0.14.1    
Keras                2.3.1     
Keras-Applications   1.0.8     
Keras-Preprocessing  1.1.0     
kiwisolver           1.1.0     
llvmlite             0.31.0    
Markdown             3.2.1     
matplotlib           3.0.3     
natsort              7.0.1     
networkx             2.4       
numba                0.47.0    
numexpr              2.7.1     
numpy                1.18.1    
oauthlib             3.1.0     
opt-einsum           3.1.0     
pandas               0.24.2    
patsy                0.5.1     
pip                  20.0.2    
pkg-resources        0.0.0     
protobuf             3.11.3    
pyasn1               0.4.8     
pyasn1-modules       0.2.8     
pyparsing            2.4.6     
python-dateutil      2.8.1     
pytz                 2019.3    
PyYAML               5.3       
requests             2.23.0    
requests-oauthlib    1.3.0     
rsa                  4.0       
scanpy               1.4.3     
scikit-learn         0.22.1    
scipy                1.4.1     
sctransfer           0.0.9     
seaborn              0.9.1     
setuptools           45.2.0    
six                  1.14.0    
statsmodels          0.11.1    
tables               3.6.1     
tensorboard          2.0.2     
tensorflow           2.0.0     
tensorflow-estimator 2.0.1     
termcolor            1.1.0     
torch                1.4.0     
tqdm                 4.43.0    
umap-learn           0.3.10    
urllib3              1.25.8    
Werkzeug             1.0.0     
wheel                0.34.2    
wrapt                1.12.0    

I also tried with tensorflow 2.1 which produces the same error message with some GPU related warnings on top. Tracing those other warnings led me to this thread: tensorflow/tensorflow#35968
However, whereas downgrading to 2.0.0 solved the issue for them it does not remove the error reported here.

Any ideas? Thanks in advance!
Jerry

CreateSeuratObject ISSUE

Hi,
thanks for have developed thi interesting tool. I have done the denoising of my data (30k cells),now i want create my seurat object but i encountered thi issue:

image

I think that my output data are denoised correctly without any error (but i'm not sure):

image

Have you any suggestion?

Best,
Domenico

Error in py_module_import (sctansfer)

Hello, I am running SAVERX with R 3.6.2. and python 3.6.10 in a conda environment. I got this error even if sctransfer (0.0.9) is present in the environment:

[1] "Input file is: ~/concatSingleCell_doubleQC.csv"
[1] "Use a pretrained model: Yes"
[1] "Data species is: Human"
[1] "Pretrained weights file is: ~/Downloads/human_Devbrain_nomanno.hdf5"
[1] "Model species is: Human"
[1] "53043 genes mapped out of 63677"
[1] "Gene names mapped, resulting file saved as: 1586351812.23148/tmpdata.rds"
[1] "Reshaped file saved as: 1586351812.23148/tmpdata.mtx"
[1] "Nonmissing indicator saved as: 1586351812.23148/tmpdata_nonmissing.txt"
[1] "Data preprocessed ..."
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'sctransfer'

The list of packages in the environment is this one:
packages in environment at /Users/chaaya/miniconda/envs/saverx:

Name Version Build Channel
absl-py 0.9.0 pypi_0 pypi
anndata 0.7.1 pypi_0 pypi
astor 0.8.1 pypi_0 pypi
ca-certificates 2020.1.1 0 anaconda
cachetools 4.1.0 pypi_0 pypi
certifi 2020.4.5.1 py36_0 anaconda
chardet 3.0.4 pypi_0 pypi
cycler 0.10.0 pypi_0 pypi
decorator 4.4.2 pypi_0 pypi
gast 0.2.2 pypi_0 pypi
get-version 2.1 pypi_0 pypi
google-auth 1.13.1 pypi_0 pypi
google-auth-oauthlib 0.4.1 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.28.1 pypi_0 pypi
h5py 2.10.0 pypi_0 pypi
idna 2.9 pypi_0 pypi
importlib-metadata 1.6.0 pypi_0 pypi
joblib 0.14.1 pypi_0 pypi
keras 2.3.1 pypi_0 pypi
keras-applications 1.0.8 pypi_0 pypi
keras-preprocessing 1.1.0 pypi_0 pypi
kiwisolver 1.2.0 pypi_0 pypi
legacy-api-wrap 1.2 pypi_0 pypi
libcxx 4.0.1 hcfea43d_1
libcxxabi 4.0.1 hcfea43d_1
libedit 3.1.20181209 hb402a30_0
libffi 3.2.1 h475c297_4
llvmlite 0.31.0 pypi_0 pypi
markdown 3.2.1 pypi_0 pypi
matplotlib 3.2.1 pypi_0 pypi
natsort 7.0.1 pypi_0 pypi
ncurses 6.2 h0a44026_0
networkx 2.4 pypi_0 pypi
numba 0.48.0 pypi_0 pypi
numexpr 2.7.1 pypi_0 pypi
numpy 1.18.2 pypi_0 pypi
oauthlib 3.1.0 pypi_0 pypi
openssl 1.1.1 h1de35cc_0 anaconda
opt-einsum 3.2.0 pypi_0 pypi
packaging 20.3 pypi_0 pypi
pandas 1.0.3 pypi_0 pypi
patsy 0.5.1 pypi_0 pypi
pip 20.0.2 py36_1 anaconda
protobuf 3.11.3 pypi_0 pypi
pyasn1 0.4.8 pypi_0 pypi
pyasn1-modules 0.2.8 pypi_0 pypi
pyparsing 2.4.7 pypi_0 pypi
python 3.6.10 hc70fcce_1
python-dateutil 2.8.1 pypi_0 pypi
pytz 2019.3 pypi_0 pypi
pyyaml 5.3.1 pypi_0 pypi
readline 8.0 h1de35cc_0
requests 2.23.0 pypi_0 pypi
requests-oauthlib 1.3.0 pypi_0 pypi
rsa 4.0 pypi_0 pypi
scanpy 1.4.6 pypi_0 pypi
scikit-learn 0.22.2.post1 pypi_0 pypi
scipy 1.4.1 pypi_0 pypi
sctransfer 0.0.9 pypi_0 pypi
seaborn 0.10.0 pypi_0 pypi
setuptools 46.1.3 py36_0
setuptools-scm 3.5.0 pypi_0 pypi
six 1.14.0 pypi_0 pypi
sqlite 3.31.1 ha441bb4_0
statsmodels 0.11.1 pypi_0 pypi
tables 3.6.1 pypi_0 pypi
tbb 2019.0 pypi_0 pypi
tensorboard 2.1.1 pypi_0 pypi
tensorflow 2.1.0 pypi_0 pypi
tensorflow-estimator 2.1.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
tk 8.6.8 ha441bb4_0
tqdm 4.45.0 pypi_0 pypi
umap-learn 0.4.0 pypi_0 pypi
urllib3 1.25.8 pypi_0 pypi
werkzeug 1.0.1 pypi_0 pypi
wheel 0.34.2 py36_0
wrapt 1.12.1 pypi_0 pypi
xz 5.2.4 h1de35cc_4
zipp 3.1.0 pypi_0 pypi
zlib 1.2.11 h1de35cc_3

Am I doing something not correct and is it fixable? Thank you in advance!

Giordano

KeyError: rmsprop

I'm getting this error trying to run SAVER-X. Can it be fixed?

 **Error in py_call_impl(callable, dots$args, dots$keywords) : 
  KeyError: 'rmsprop'** 
9.
stop(structure(list(message = "KeyError: 'rmsprop'", call = py_call_impl(callable, 
    dots$args, dots$keywords), cppstack = structure(list(file = "", 
    line = -1L, stack = c("/home/tjcooper/R/x86_64-pc-linux-gnu-library/4.0/reticulate/libs/reticulate.so(Rcpp::exception::exception(char const*, bool)+0x74) [0x7fb3e9008294]", 
    "/home/tjcooper/R/x86_64-pc-linux-gnu-library/4.0/reticulate/libs/reticulate.so(Rcpp::stop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x29) [0x7fb3e8ff8a66]",  ... 
8.
train_joint at train_joint.py#95
7.
autoencode at api_pretrain.py#123
6.
api$autoencode(n_inoutnodes_human = n_human, n_inoutnodes_mouse = n_mouse, 
    shared_size = shared_size, mtx_file = mtx_file, pred_mtx_file = test_mtx_file, 
    species = model.species, nonmissing_indicator = nonmissing_indicator, 
    initial_file = pretrain_file, out_dir = out_dir, batch_size = batch_size,  ... 
5.
autoencode(x[, train.idx], python.module, main, x.test, pretrain_file, 
    nonmissing_indicator, n_human, n_mouse, shared_size, model.species, 
    out_dir, batch_size, write_output_to_tsv, verbose_sum = F, 
    verbose_fit = 0L, ...) 
4.
autoFilterCV(x, sctransfer, main, pretrain_file = pretrained.weights.file, 
    nonmissing_indicator = nonmissing_indicator, model.species = model.species, 
    out_dir = out.dir, batch_size = batch_size, write_output_to_tsv = write_output_to_tsv, 
    ...) 
3.
system.time(result <- autoFilterCV(x, sctransfer, main, pretrain_file = pretrained.weights.file, 
    nonmissing_indicator = nonmissing_indicator, model.species = model.species, 
    out_dir = out.dir, batch_size = batch_size, write_output_to_tsv = write_output_to_tsv, 
    ...)) 
2.
computePrediction(task.id, input.file.name, data.matrix, data.species, 
    use.pretrain, pretrained.weights.file, model.species, model.nodes.ID, 
    verbose = verbose, is.large.data = is.large.data, batch_size = batch_size, 
    clearup.python.session = clearup.python.session, ...) 
1.
saverx("/home/tjcooper/Documents/mouse_retina/shekhar_downsampled.csv", 
    data.species = "Mouse", use.pretrain = T, pretrained.weights.file = "/home/tjcooper/Documents/SAVERX_pretrained_weights/mouse_Retina.hdf5", 
    model.species = "Mouse") 

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] en_IL.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] SAVERX_1.0.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5         rstudioapi_0.11    magrittr_1.5       rappdirs_0.3.1     tidyselect_1.1.0   munsell_0.5.0      cowplot_1.0.0      colorspace_1.4-1   lattice_0.20-41    R6_2.4.1           rlang_0.4.7        dplyr_1.0.0       
[13] tools_4.0.2        grid_4.0.2         gtable_0.3.0       ellipsis_0.3.1     tibble_3.0.3       lifecycle_0.2.0    crayon_1.3.4       Matrix_1.2-18      purrr_0.3.4        RColorBrewer_1.1-2 ggplot2_3.3.2      vctrs_0.3.2       
[25] glue_1.4.1         compiler_4.0.2     pillar_1.4.6       generics_0.0.2     scales_1.1.1       jsonlite_1.7.0     reticulate_1.16    pkgconfig_2.0.3   
Weights loaded from /home/tjcooper/Documents/SAVERX_pretrained_weights/mouse_Retina.hdf5!
//usr/local/lib/python3.8/dist-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(

build users' own pretrained model

Hi,
Just wondering whether it's possible for users to build their own pretrained model, if the scRNA-seq comes from a cell type not included in the current pretrained model provided by saver-x (for example, HEK293t and Jurkat cell lines)? The corresponding bulk RNA-seq data are available.
Thanks!

S4 error

I excute the command:
denoised_rds_file <- saverx(seurat_rds_file,is.large.data = T)

seurat_rds_file is a rds object file, but there was a error:
[1] "Use a pretrained model: No"
Error in as.vector(data) :
no method for coercing this S4 class to a vector

image

ModuleNotFoundError: No module named 'scanpy.api'

Hi,

I got this error when using SAVERX.

RRuntimeError                             Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 r('''
      2     file <- saverx("./test.csv")
      3     denoised.data <- readRDS(file)
      4 ''')

File ~/.local/lib/python3.9/site-packages/rpy2/robjects/__init__.py:459, in R.__call__(self, string)
    457 def __call__(self, string):
    458     p = rinterface.parse(string)
--> 459     res = self.eval(p)
    460     return conversion.get_conversion().rpy2py(res)

File ~/.local/lib/python3.9/site-packages/rpy2/robjects/functions.py:202, in SignatureTranslatedFunction.__call__(self, *args, **kwargs)
    200         v = kwargs.pop(k)
    201         kwargs[r_k] = v
--> 202 return (super(SignatureTranslatedFunction, self)
    203         .__call__(*args, **kwargs))

File ~/.local/lib/python3.9/site-packages/rpy2/robjects/functions.py:125, in Function.__call__(self, *args, **kwargs)
    123     else:
    124         new_kwargs[k] = cv.py2rpy(v)
--> 125 res = super(Function, self).__call__(*new_args, **new_kwargs)
    126 res = cv.rpy2py(res)
    127 return res

File ~/.local/lib/python3.9/site-packages/rpy2/rinterface_lib/conversion.py:45, in _cdata_res_to_rinterface.<locals>._(*args, **kwargs)
     44 def _(*args, **kwargs):
---> 45     cdata = function(*args, **kwargs)
     46     # TODO: test cdata is of the expected CType
     47     return _cdata_to_rinterface(cdata)

File ~/.local/lib/python3.9/site-packages/rpy2/rinterface.py:813, in SexpClosure.__call__(self, *args, **kwargs)
    806     res = rmemory.protect(
    807         openrlib.rlib.R_tryEval(
    808             call_r,
    809             call_context.__sexp__._cdata,
    810             error_occured)
    811     )
    812     if error_occured[0]:
--> 813         raise embedded.RRuntimeError(_rinterface._geterrmessage())
    814 return res

RRuntimeError: Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'scanpy.api'

Probably "scanpy.api" is deprecated.
Could you fix this?

Error in data processed

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.

How can we avoid library size normalization

Hello,

I need to use unnormalized count data for the analysis following saverx.

I am wondering if there is a way to skip the normalization of the resulting denoised dataset.

For example, when using the saver function we could set size.factor=1 to avoid normalization.

Is this also possible for saverx ?

Thank you very much!

Problem running SAVERX:: Module not found

Hi everyone!

I'm trying to run SAVERX, on a docker. I've installed all the necessary libraries as far as I know, but I still hitting this wall:

filepretrained <- saverx( "./hemato_data_raw.txt", data.species = "Human", 
 is.large.data = T, use.pretrain = T, pretrained.weights.file = "SAVERX_pretrained_weights/human_Immune.hdf5",  
model.species = "Human")

[1] "Input file is: ./hemato_data_raw.txt"
[1] "Use a pretrained model: Yes"
[1] "Data species is: Human"
[1] "Pretrained weights file is: SAVERX_pretrained_weights/human_Immune.hdf5"
[1] "Model species is: Human"
[1] "15548 genes mapped out of 15766"
[1] "Gene names mapped, resulting file saved as: 1635183112.38965/tmpdata.rds"
[1] "Reshaped file saved as: 1635183112.38965/tmpdata.mtx"
[1] "Nonmissing indicator saved as: 1635183112.38965/tmpdata_nonmissing.txt"
[1] "Data preprocessed ..."
Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'keras.objectives'

Detailed traceback:
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
  File "/usr/local/lib/python3.8/dist-packages/sctransfer/__init__.py", line 5, in <module>
    from . import api, api_pretrain
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
  File "/usr/local/lib/python3.8/dist-packages/sctransfer/api.py", line 16, in <module>
    from .network import NBConstantDispAutoencoder
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
  File "/usr/local/lib/python3.8/dist-packages/sctransfer/network.py", line 10, in <module>
    from keras.objectives import mean_squared_error
  File "/usr/local/lib/R/site-library/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(

The problem seem to at the moment of passing the 'keras.objectives' from python to R... But I cannot find this keras.objectives on the keras documentation, so I do not know if it's a deprecated function or anything...

tf.version == '2.6.0'

What should I do?

Thanks!

py_get_attr_impl(x, name, silent) : AttributeError: 'AxisArrays' object has no attribute 'X_dca'

Hi,

thanks for developing SAVERX - great idea. I tried to run it on MacOS Mohave 10.14.3 with R 3.5.2 using your test dataset and the suggested command from the manual but it fails with an error. Here is the output:

saverx("./testdata/shekhar_downsampled.csv")
[1] "Input file is: ./testdata/shekhar_downsampled.csv"
[1] "Use a pretrained model: No"
Using TensorFlow backend.

[1] "Python module sctransfer imported ..."
[1] "Processed file saved as: ./testdata/shekhar_downsampled_temp.rds"
[1] "Data preprocessed ..."
[1] "Cross-validation round: 1"

Error in py_get_attr_impl(x, name, silent) :
AttributeError: 'AxisArrays' object has no attribute 'X_dca'
Timing stopped at: 208.4 15.33 28.45

help appreciated.

Best
Max

EDIT: the test sample runs through fine when setting is.large.data = T. I don't think it's a memory issue though, since I have plenty of RAM to spare while running.

Specify number of cores for cross-validation

Hi,

First of all, thanks a lot for your package and the documentation. I'm trying to run the main function saverx on a shared Linux server (18.04.2 LTS) but I'm having troubles limiting the number of cores that are used during the [1] "Cross-validation round: 1" step. I have tried to use the ncore argument and to set a tensorflow session but it doesn't seem to work. The function still uses all cores of the server.

library(tensorflow)
library(keras)
library(SAVERX)

config <- tf$ConfigProto(intra_op_parallelism_threads = 6L,
                         inter_op_parallelism_threads = 6L)
session = tf$Session(config = config)
k_set_session(session)

res <- saverx(input.file.name = "data.rds", data.species = "Human", 
              ncores = 6, clearup.python.session = TRUE)

Do you know how I could limit the CPU usage ?

Best,
Anthony

pre-trained models across technologies

Does it make sense to use pre-trained models for other technologies? For example, human immune model is based on 10x data. Can it be used for non-10x datasets? Do you know how much of an effect the dropout rate and coverage (3' or 5' versus full transcript) have?

On a related note, your publication states SAVER-X can only denoise UMI counts. Do you have any recommendations for non-UMI data? Can it perhaps be adjusted in some way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.