sanger-pathogens / seroba

k-mer based Pipeline to identify the Serotype from Illumina NGS reads
https://sanger-pathogens.github.io/seroba/
Other
19 stars 16 forks source link

Conda install 'createDBs' and 'getPneumocat' errors #63

Open rpetit3 opened 2 years ago

rpetit3 commented 2 years ago

Hello!

I was thinking about including the databases in the bioconda recipe, but I'm running into some errors.

I installed Seroba using mamba

mamba create -n test-seroba -c conda-forge -c bioconda seroba

I'm getting the following errors:

createDBs

seroba createDBs database 71
Traceback (most recent call last):
  File "/home/robert_petit/miniconda3/envs/test-seroba/bin/seroba", line 86, in <module>
    args.func(args)
  File "/home/robert_petit/miniconda3/envs/test-seroba/lib/python3.8/site-packages/seroba/tasks/createDBs.py", line 10, in run
    ref_db.run()
  File "/home/robert_petit/miniconda3/envs/test-seroba/lib/python3.8/site-packages/seroba/ref_db_creator.py", line 236, in run
    self.meta_dict = self._read_meta_data_tsv(self.meta_data_tsv)
  File "/home/robert_petit/miniconda3/envs/test-seroba/lib/python3.8/site-packages/seroba/ref_db_creator.py", line 183, in _read_meta_data_tsv
    with open(meta_data_tsv,'r') as fobj:
FileNotFoundError: [Errno 2] No such file or directory: 'database/meta.tsv'

getPneumocat

seroba getPneumocat database
--2022-01-26 02:36:35--  https://github.com/phe-bioinformatics/PneumoCaT/archive/v1.1.tar.gz
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/phe-bioinformatics/PneumoCaT/tar.gz/v1.1 [following]
--2022-01-26 02:36:35--  https://codeload.github.com/phe-bioinformatics/PneumoCaT/tar.gz/v1.1
Resolving codeload.github.com (codeload.github.com)... 140.82.114.9
Connecting to codeload.github.com (codeload.github.com)|140.82.114.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v1.1.tar.gz’

v1.1.tar.gz                                                                  [                                                                 <=>                                                                                                              ] 320.07M  24.1MB/s    in 13s

2022-01-26 02:36:48 (24.0 MB/s) - ‘v1.1.tar.gz’ saved [335618305]

Traceback (most recent call last):
  File "/home/robert_petit/miniconda3/envs/test-seroba/bin/seroba", line 86, in <module>
    args.func(args)
  File "/home/robert_petit/miniconda3/envs/test-seroba/lib/python3.8/site-packages/seroba/tasks/getPneumocat.py", line 7, in run
    pneumo.run()
  File "/home/robert_petit/miniconda3/envs/test-seroba/lib/python3.8/site-packages/seroba/get_pneumocat_data.py", line 105, in run
    self._pneumocat_db_2_tsv(self.serogroup_dir,self.out_file)
  File "/home/robert_petit/miniconda3/envs/test-seroba/lib/python3.8/site-packages/seroba/get_pneumocat_data.py", line 47, in _pneumocat_db_2_tsv
    allele_snp=yaml.load( open( os.path.join(serogroup_dir,subdir,'mutationdb.yml'), "rb" ) )
TypeError: load() missing 1 required positional argument: 'Loader'

Here's my conda env if you think it might be helpful

conda env export
name: test-seroba
channels:
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=1_gnu
  - _sysroot_linux-64_curr_repodata_hack=3=h5bd9786_13
  - ariba=2.14.6=py38hc37a69a_2
  - bcftools=1.14=hde04aa1_1
  - beautifulsoup4=4.10.0=pyha770c72_0
  - biopython=1.77=py38h1e0a361_1
  - bowtie2=2.2.5=py38h8c62d01_8
  - brotli=1.0.9=h7f98852_6
  - brotli-bin=1.0.9=h7f98852_6
  - bzip2=1.0.8=h7f98852_4
  - c-ares=1.18.1=h7f98852_0
  - ca-certificates=2021.10.26=h06a4308_2
  - cd-hit=4.8.1=h2e03b76_5
  - certifi=2021.10.8=py38h578d9bd_1
  - cycler=0.11.0=pyhd8ed1ab_0
  - dendropy=4.5.2=pyh3252c3a_0
  - fonttools=4.29.0=py38h497a2fe_0
  - freetype=2.11.0=h70c0345_0
  - gettext=0.21.0=hf68c758_0
  - giflib=5.2.1=h516909a_2
  - gsl=2.7=he838d99_0
  - htslib=1.14=h5138463_1
  - icu=69.1=h9c3ff4c_0
  - jpeg=9d=h516909a_0
  - kernel-headers_linux-64=3.10.0=h4a8ded7_13
  - kiwisolver=1.3.2=py38h1fd1430_1
  - kmc=3.2.1=h95f258a_1
  - krb5=1.19.2=hcc1bbae_3
  - lcms2=2.12=hddcbb42_0
  - ld_impl_linux-64=2.36.1=hea4e1c9_2
  - libblas=3.9.0=13_linux64_openblas
  - libbrotlicommon=1.0.9=h7f98852_6
  - libbrotlidec=1.0.9=h7f98852_6
  - libbrotlienc=1.0.9=h7f98852_6
  - libcblas=3.9.0=13_linux64_openblas
  - libcurl=7.81.0=h2574ce0_0
  - libdeflate=1.9=h7f98852_0
  - libedit=3.1.20210714=h7f8727e_0
  - libev=4.33=h516909a_1
  - libffi=3.4.2=h7f98852_5
  - libgcc-ng=11.2.0=h1d223b6_12
  - libgfortran-ng=11.2.0=h69a702a_12
  - libgfortran5=11.2.0=h5c6108e_12
  - libgomp=11.2.0=h1d223b6_12
  - libiconv=1.16=h516909a_0
  - libidn2=2.3.2=h7f98852_0
  - liblapack=3.9.0=13_linux64_openblas
  - libnghttp2=1.46.0=hce63b2e_0
  - libnsl=2.0.0=h7f98852_0
  - libopenblas=0.3.18=pthreads_h8fe5266_0
  - libpng=1.6.37=hed695b0_2
  - libssh2=1.10.0=ha56f1ee_2
  - libstdcxx-ng=11.2.0=he4da1e4_12
  - libtiff=4.2.0=hf544144_3
  - libunistring=0.9.10=h14c3975_0
  - libwebp=1.2.0=h3452ae3_0
  - libwebp-base=1.2.0=h7f98852_2
  - libxml2=2.9.12=h885dcf4_1
  - libzlib=1.2.11=h36c2ea0_1013
  - llvm-openmp=8.0.1=hc9558a2_0
  - lz4-c=1.9.3=h9c3ff4c_1
  - matplotlib-base=3.5.1=py38hf4fb855_0
  - mummer=3.23=pl5321h1b792b2_13
  - munkres=1.1.4=pyh9f0ad1d_0
  - ncurses=6.2=h58526e2_4
  - numpy=1.22.1=py38h6ae9a64_0
  - olefile=0.46=pyh9f0ad1d_1
  - openmp=8.0.1=0
  - openssl=1.1.1m=h7f8727e_0
  - packaging=21.3=pyhd8ed1ab_0
  - perl=5.32.1=1_h7f98852_perl5
  - pillow=8.4.0=py38h5aabda8_0
  - pip=21.3.1=pyhd8ed1ab_0
  - pyfastaq=3.17.0=py_2
  - pymummer=0.10.3=py_2
  - pyparsing=3.0.7=pyhd8ed1ab_0
  - pysam=0.17.0=py38h104f7d5_1
  - python=3.8.12=hb7a2778_2_cpython
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python_abi=3.8=2_cp38
  - pyyaml=6.0=py38h497a2fe_3
  - readline=8.1=h46c0cb4_0
  - samtools=1.14=hb421002_0
  - seroba=1.0.2=py_0
  - setuptools=60.5.0=py38h578d9bd_0
  - six=1.16.0=pyh6c4a22f_0
  - soupsieve=2.3.1=pyhd8ed1ab_0
  - spades=3.15.3=h95f258a_1
  - sqlite=3.37.0=h9cd32fc_0
  - sysroot_linux-64=2.17=h4a8ded7_13
  - tk=8.6.11=h27826a3_1
  - unicodedata2=14.0.0=py38h497a2fe_0
  - wget=1.20.3=ha56f1ee_1
  - wheel=0.37.1=pyhd8ed1ab_0
  - xz=5.2.5=h516909a_1
  - yaml=0.2.5=h7f98852_2
  - zlib=1.2.11=h36c2ea0_1013
  - zstd=1.5.2=ha95c52a_0
prefix: /home/robert_petit/miniconda3/envs/test-seroba
Rudolph-afk commented 2 years ago

Hi

In case this was not resolved and if someone else gets a similar error.

According to the usage described in the documentation. You need not run getPneumocat with your version of seroba (1.0.2).

You first have to clone the repo and then copy the database directory in the repo to a location of your liking and then pass it as parameter to createDBs.

Always specify the full path to the database directory. like so:

seroba createDBs path/to/database 71

If executing in the same directory as the database then:

seroba createDBs database 71

In both cases assuming you kept the name database. You can always name the directory as anything you like but always give the full path to the data base if not running in the same directory.

Hope this helps.