W-L / deviaTE

Python tool for the analysis and visualization of mobile genetic elements
GNU General Public License v3.0
19 stars 7 forks source link

Error in install.packages("data.table", repos = rep) : unable to install packages #12

Open ebhmayra opened 1 year ago

ebhmayra commented 1 year ago

Hello,

I was running deviaTE, and I got the following error. I checked and the library is writable

This was my script:

deviaTE --input_fq vieillardiiBT023_cat_uniq.fq --families ALL --library $data_folder/impolita-families_mcclintok7.fa

This is the error:

During startup - Warning message: Setting LC_CTYPE failed, using "C" Warning in install.packages("data.table", repos = rep) : 'lib = "/home/apps/conda/miniconda3/envs/devia-te-0.3.8/lib/R/library"' is not writable Error in install.packages("data.table", repos = rep) : unable to install packages Execution halted

End of deviaTE run

Best wishes, Mayra

W-L commented 1 year ago

Hi Mayra, I'm afraid I can't reproduce the issue. The packages are installing fine for me on a new conda environment. Would you mind running ls -l /home/apps/conda/miniconda3/envs/devia-te-0.3.8/lib/R/library and posting the output? Just to double-check that the directory exists and is writable by your user.

ebhmayra commented 1 year ago

Hi,

Here the output: .... total 812 drwxrwxr-x 10 appadmin appadmin 15 May 8 14:00 MASS drwxrwxr-x 12 appadmin appadmin 22 May 8 14:00 Matrix drwxrwxr-x 7 appadmin appadmin 12 May 8 14:00 R6 drwxrwxr-x 6 appadmin appadmin 10 May 8 14:00 RColorBrewer drwxrwxr-x 16 appadmin appadmin 23 May 8 14:00 Rcpp drwxrwxr-x 8 appadmin appadmin 13 May 8 14:00 argparse drwxrwxr-x 6 appadmin appadmin 9 May 8 14:00 assertthat drwxrwxr-x 7 appadmin appadmin 10 May 8 14:00 base drwxrwxr-x 6 appadmin appadmin 11 May 8 14:00 cli drwxrwxr-x 10 appadmin appadmin 16 May 8 14:00 colorspace drwxrwxr-x 6 appadmin appadmin 9 May 8 14:00 compiler drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 cowplot drwxrwxr-x 6 appadmin appadmin 16 May 8 14:00 crayon drwxrwxr-x 9 appadmin appadmin 14 May 8 14:00 data.table drwxrwxr-x 6 appadmin appadmin 9 May 8 14:00 datasets drwxrwxr-x 7 appadmin appadmin 10 May 8 14:00 dichromat drwxrwxr-x 9 appadmin appadmin 13 May 8 14:00 digest drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 fansi drwxrwxr-x 6 appadmin appadmin 11 May 8 14:00 findpython drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 getopt drwxrwxr-x 8 appadmin appadmin 14 May 8 14:00 ggplot2 drwxrwxr-x 8 appadmin appadmin 13 May 8 14:00 glue drwxrwxr-x 11 appadmin appadmin 14 May 8 14:00 grDevices drwxrwxr-x 8 appadmin appadmin 11 May 8 14:00 graphics drwxrwxr-x 8 appadmin appadmin 11 May 8 14:00 grid drwxrwxr-x 8 appadmin appadmin 12 May 8 14:00 gridExtra drwxrwxr-x 6 appadmin appadmin 10 May 8 14:00 gtable drwxrwxr-x 8 appadmin appadmin 14 May 8 14:00 jsonlite drwxrwxr-x 6 appadmin appadmin 10 May 8 14:00 labeling drwxrwxr-x 10 appadmin appadmin 15 May 8 14:00 lattice drwxrwxr-x 8 appadmin appadmin 12 May 8 14:00 lazyeval drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 magrittr drwxrwxr-x 7 appadmin appadmin 10 May 8 14:00 methods drwxrwxr-x 9 appadmin appadmin 13 May 8 14:00 mgcv drwxrwxr-x 7 appadmin appadmin 12 May 8 14:00 munsell drwxrwxr-x 11 appadmin appadmin 16 May 8 14:00 nlme drwxrwxr-x 8 appadmin appadmin 11 May 8 14:00 parallel drwxrwxr-x 6 appadmin appadmin 10 May 8 14:00 pillar drwxrwxr-x 8 appadmin appadmin 13 May 8 14:00 plyr drwxrwxr-x 8 appadmin appadmin 16 May 8 14:00 proto drwxrwxr-x 8 appadmin appadmin 14 May 8 14:00 reshape2 drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 rlang drwxrwxr-x 7 appadmin appadmin 12 May 8 14:00 scales drwxrwxr-x 7 appadmin appadmin 10 May 8 14:00 splines drwxrwxr-x 8 appadmin appadmin 13 May 8 14:00 stats drwxrwxr-x 6 appadmin appadmin 9 May 8 14:00 stats4 drwxrwxr-x 8 appadmin appadmin 15 May 8 14:00 stringi drwxrwxr-x 9 appadmin appadmin 14 May 8 14:00 stringr drwxrwxr-x 9 appadmin appadmin 12 May 8 14:00 tcltk drwxrwxr-x 8 appadmin appadmin 13 May 8 14:00 tibble drwxrwxr-x 7 appadmin appadmin 10 May 8 14:00 tools drwxrwxr-x 20 appadmin appadmin 21 May 8 14:00 translations drwxrwxr-x 8 appadmin appadmin 13 May 8 14:00 utf8 drwxrwxr-x 10 appadmin appadmin 14 May 8 14:00 utils drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 viridisLite drwxrwxr-x 7 appadmin appadmin 11 May 8 14:00 withr

...

Best, Mayra

W-L commented 1 year ago

Thanks! Is this a shared system, or is appadmin your user? Any other user trying to write in this directory would probably get an error about the directory being not writable (3rd permission indicator r-x). Or in other words, was the conda environment created by the same user as running the command in your original post?

ebhmayra commented 1 year ago

Hi,

Yes, this is a computer cluster, so devia-Te was installed there by the central administrator. I just checked that all programs installed there have the r-x, not writable permission for everyone (third permission).

Best, Mayra

W-L commented 1 year ago

I see. This tool was created when R integration in conda was a bit patchy and not all packages were available, so installation of R packages was done during the first execution of the program instead. This is definitely not ideal, especially when users don't have the permission to do that like in your case. There are two options you can try: i) either installation with one of the other methods described in the readme, if any of them work with your user permissions. ii) Use a more complete conda specification that also includes the R packages. For this, you could ask your admin to install from this yaml specification instead (just exported this from a fresh working installation on my system):

name: deviaTE_env
channels:
  - w-l
  - r
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - _r-mutex=1.0.0=anacondar_1
  - _sysroot_linux-64_curr_repodata_hack=3=haa98f57_10
  - bcftools=1.9=h47928c2_2
  - binutils_impl_linux-64=2.35.1=h27ae35d_9
  - binutils_linux-64=2.35.1=h454624a_30
  - blas=1.0=openblas
  - bwa=0.7.17=h5bf99c6_8
  - bwidget=1.9.11=1
  - bzip2=1.0.8=h7b6447c_0
  - ca-certificates=2023.01.10=h06a4308_0
  - cairo=1.14.12=h8948797_3
  - certifi=2021.5.30=py36h06a4308_0
  - curl=7.61.1=hbc83047_0
  - deviate=0.3.8=py36_0
  - expat=2.4.9=h6a678d5_0
  - fontconfig=2.14.1=h52c9d5c_1
  - freetype=2.12.1=h4a9f257_0
  - fribidi=1.0.10=h7b6447c_0
  - gcc_impl_linux-64=7.5.0=h7105cf2_17
  - gcc_linux-64=7.5.0=h8f34230_30
  - gdbm=1.18=h941a26a_0
  - gfortran_impl_linux-64=7.5.0=ha8c8e06_17
  - gfortran_linux-64=7.5.0=h96bb648_30
  - glib=2.56.2=hd408876_0
  - graphite2=1.3.14=h295c915_1
  - gsl=2.4=h14c3975_4
  - gxx_impl_linux-64=7.5.0=h0a5bf11_17
  - gxx_linux-64=7.5.0=hffc177d_30
  - harfbuzz=1.8.8=hffaf4a1_0
  - htslib=1.9=h47928c2_5
  - icu=58.2=he6710b0_3
  - jpeg=9e=h5eee18b_1
  - kernel-headers_linux-64=3.10.0=h57e8cba_10
  - krb5=1.16.4=h173b8e3_0
  - ld_impl_linux-64=2.35.1=h7274673_9
  - libcurl=7.61.1=h20c2e04_0
  - libdeflate=1.0=h14c3975_1
  - libedit=3.1.20181209=hc058e9b_0
  - libffi=3.2.1=hf484d3e_1007
  - libgcc-devel_linux-64=7.5.0=hbbeae57_17
  - libgcc-ng=11.2.0=h1234567_1
  - libgfortran-ng=7.5.0=ha8ba4b0_17
  - libgfortran4=7.5.0=ha8ba4b0_17
  - libgomp=11.2.0=h1234567_1
  - libopenblas=0.3.18=hf726d26_0
  - libpng=1.6.39=h5eee18b_0
  - libssh2=1.10.0=h8f2d780_0
  - libstdcxx-devel_linux-64=7.5.0=hf0c5c8d_17
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtiff=4.2.0=hecacb30_2
  - libuuid=1.41.5=h5eee18b_0
  - libwebp-base=1.2.4=h5eee18b_1
  - libxcb=1.15=h7f8727e_0
  - libxml2=2.9.14=h74e7548_0
  - lz4-c=1.9.4=h6a678d5_0
  - make=4.2.1=h1bed415_1
  - ncurses=6.1=he6710b0_1
  - numpy=1.17.0=py36h99e49ec_0
  - numpy-base=1.17.0=py36h2f8d375_0
  - openssl=1.1.1t=h7f8727e_0
  - pandas=0.23.4=py36h04863e7_0
  - pango=1.42.4=h049681c_0
  - pcre=8.45=h295c915_0
  - perl=5.34.0=h5eee18b_2
  - pip=21.2.2=py36h06a4308_0
  - pixman=0.40.0=h7f8727e_1
  - pysam=0.15.1=py36h0380709_0
  - python=3.6.10=h0371630_0
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - pytz=2021.3=pyhd3eb1b0_0
  - r-argparse=1.1.1=r351h6115d3f_0
  - r-assertthat=0.2.0=r351h6115d3f_0
  - r-base=3.5.1=h1e0a451_2
  - r-cli=1.0.0=r351h6115d3f_1
  - r-colorspace=1.3_2=r351h96ca727_0
  - r-cowplot=0.9.3=r351h6115d3f_1001
  - r-crayon=1.3.4=r351h6115d3f_0
  - r-data.table=1.11.6=r351hc070d10_0
  - r-dichromat=2.0_0=r351h6115d3f_4
  - r-digest=0.6.15=r351h96ca727_0
  - r-fansi=0.2.3=r351h96ca727_0
  - r-findpython=1.0.3=r351h6115d3f_0
  - r-getopt=1.20.2=r351h6115d3f_0
  - r-ggplot2=3.0.0=r351h6115d3f_0
  - r-glue=1.3.0=r351h96ca727_0
  - r-gridextra=2.3=r351h6115d3f_0
  - r-gtable=0.2.0=r351h6115d3f_0
  - r-jsonlite=1.5=r351h96ca727_0
  - r-labeling=0.3=r351h6115d3f_4
  - r-lattice=0.20_35=r351h96ca727_0
  - r-lazyeval=0.2.1=r351h96ca727_0
  - r-magrittr=1.5=r351h6115d3f_4
  - r-mass=7.3_50=r351h96ca727_0
  - r-matrix=1.2_14=r351h96ca727_0
  - r-mgcv=1.8_24=r351h96ca727_0
  - r-munsell=0.5.0=r351h6115d3f_0
  - r-nlme=3.1_137=r351ha65eedd_0
  - r-pillar=1.3.0=r351h6115d3f_0
  - r-plyr=1.8.4=r351h29659fb_0
  - r-proto=1.0.0=r351h6115d3f_0
  - r-r6=2.2.2=r351h6115d3f_0
  - r-rcolorbrewer=1.1_2=r351h6115d3f_0
  - r-rcpp=0.12.18=r351h29659fb_0
  - r-reshape2=1.4.3=r351h29659fb_0
  - r-rlang=0.2.1=r351h96ca727_0
  - r-scales=0.5.0=r351h29659fb_0
  - r-stringi=1.2.4=r351h29659fb_0
  - r-stringr=1.3.1=r351h6115d3f_0
  - r-tibble=1.4.2=r351h96ca727_0
  - r-utf8=1.1.4=r351h96ca727_0
  - r-viridislite=0.3.0=r351h6115d3f_0
  - r-withr=2.1.2=r351h6115d3f_0
  - readline=7.0=h7b6447c_5
  - samtools=1.9=h8ee4bcc_1
  - setuptools=58.0.4=py36h06a4308_0
  - six=1.16.0=pyhd3eb1b0_1
  - sqlite=3.31.1=h7b6447c_0
  - sysroot_linux-64=2.17=h57e8cba_10
  - tk=8.6.12=h1ccaba5_0
  - tktable=2.10=h14c3975_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.2.10=h5eee18b_1
  - zlib=1.2.13=h5eee18b_0
  - zstd=1.5.5=hc292b87_0

Apologies for the hassle, and please let me know if this works out. Once I have some more time, I'll improve the installation procedure to avoid this.

ebhmayra commented 1 year ago

Hi,

I installed it locally (on my user account), and it works, but I got another error:

samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

However, I solved it by loading Samtools before activating deviaTE_env

So, thank you very much for your help.

Best, Mayra

W-L commented 1 year ago

Thanks very much for reporting back, and glad that it worked out this way. The error about shared libraries of samtools is an issue on their end with some dependencies of that specific version. It can be solved by creating a link to the library (replacing the correct path to the library folder of your conda env if different to this example):

cd ~/miniconda3/envs/deviaTE_env/lib/
ln -s libcrypto.so.1.1 libcrypto.so.1.0.0

I'll make sure to update the dependencies to a newer version of samtools to avoid this, so will leave the issue open until then. Thanks again