Some problems with iphop installation using mamba.

Issue #29 resolved
Liu Songfeng created an issue

I used mamba to install iphop, and there was nothing wrong with this process. However, when I use it, the following strange problem occurs.


(iphop_env) wang@wang-desktop:/mnt/md0/database/iphop/iphop$ iphop
iPHoP v1.2.0: integrating Host Phage Predictions
https://bitbucket.org/srouxjgi/iphop

usage: iphop <task> [options]

task:
predict run full pipeline to generate host prediction for some input phage genome(s)
download download and setup the latest host database
add_to_db add some host genomes to the database of hosts (e.g. MAGs derived from the same metagenome(s))

other:
split small utility to split a fasta file into smaller batches (can be useful if you would like to split your input and run iPHoP separately for each batch)
clean small utility to clean the output directory of iPHoP by compressing some of the larger files.

optional arguments:
-h, --help show this help message and exit
(iphop_env) wang@wang-desktop:/mnt/md0/database/iphop/iphop$ iphop download --db_dir /mnt/md0/database/iphop
sh: 0: getcwd() failed: No such file or directory
Traceback (most recent call last):
File "/home/wang/anaconda3/envs/mamba/envs/iphop_env/bin/iphop", line 10, in <module>
sys.exit(cli())
File "/home/wang/anaconda3/envs/mamba/envs/iphop_env/lib/python3.8/site-packages/iphop/iphop.py", line 17, in cli
current_dir = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
(iphop_env) wang@wang-desktop:/mnt/md0/database/iphop/iphop$ iphop -h
sh: 0: getcwd() failed: No such file or directory
Traceback (most recent call last):
File "/home/wang/anaconda3/envs/mamba/envs/iphop_env/bin/iphop", line 10, in <module>
sys.exit(cli())
File "/home/wang/anaconda3/envs/mamba/envs/iphop_env/lib/python3.8/site-packages/iphop/iphop.py", line 17, in cli
current_dir = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory


I'm sorry, but my limited knowledge does not allow me to identify and solve this problem. Can you help with this issue?

Comments (4)

  1. Liu Songfeng reporter

    I think I've found the problem.


    When I change current_dir = os.getcwd() to current_dir = ("/mnt/md0/database/iphop" in iphop.py, the following results appear


    (iphop_env) wang@wang-desktop:/mnt/md0/database/iphop/iphop$ iphop download --db_dir /mnt/md0/database/iphop
    sh: 0: getcwd() failed: No such file or directory

    WARNING

    iPHoP database is pretty big, and will require around ~ 350Gb of disk space and some time to download and set up (except if you are downloading the test database, in which case it's only ~ 5Gb). Areyou sure you want to continue ?
    ################
    Please confirm you are ready to download the iPHoP database now. [y/N]: y
    sh: 0: getcwd() failed: No such file or directory
    --2023-03-13 22:05:22-- https://portal.nersc.gov/cfs/m342/iphop/db/iPHoP.latest.tar.gz.md5
    正在解析主机 portal.nersc.gov (portal.nersc.gov)... 128.55.206.108, 128.55.206.113, 128.55.206.106
    正在连接 portal.nersc.gov (portal.nersc.gov)|128.55.206.108|:443... 已连接。
    已发出 HTTP 请求,正在等待回应... 200 OK
    长度:731 [application/x-gzip]
    正在保存至: “/mnt/md0/database/iphop/iPHoP.latest.tar.gz.md5”

    /mnt/md0/database/iphop/iPHoP.latest.tar.gz.md5 100%[============================================================================================================>] 731 --.-KB/s 用时 0s

    2023-03-13 22:05:26 (70.3 MB/s) - 已保存 “/mnt/md0/database/iphop/iPHoP.latest.tar.gz.md5” [731/731])

    expected md5 ['3ce666cf17fc1151f56b150084af4ba8', 'cf9dd04dd4103c7b7ba1afe43207ccaf', '9ffa77af92b86ea7084f5853a27f6d9e', 'e8cc2e7bb8f0962c258e8fd334646803', '6bc703ac96139a66d0af4901d9d22faa', '777907759f8d4bf4aa2a66ce5d3d5c83', '597de89abdb92a8daa3e18de6c3151f5', '18ccdde6f3b1eced40774f07134b82ea', '68df620906705994d10011533bae982f', '7f9d24df311bb80bbab0cf33703c036a', 'e8fd700d62726c6dc97b8188c256f848', '24fce2c5130db27aa391366307f22f0d']
    We download the database as a single file
    We are now starting the download of /mnt/md0/database/iphop/iPHoP_db_Sept21.tar.gz
    sh: 0: getcwd() failed: No such file or directory
    --2023-03-13 22:05:27-- https://portal.nersc.gov/cfs/m342/iphop/db/iPHoP_db_Sept21.tar.gz
    正在解析主机 portal.nersc.gov (portal.nersc.gov)... 128.55.206.108, 128.55.206.113, 128.55.206.106
    正在连接 portal.nersc.gov (portal.nersc.gov)|128.55.206.108|:443... 已连接。
    已发出 HTTP 请求,正在等待回应... 200 OK
    长度:116930251283 (109G) [application/x-gzip]
    正在保存至: “/mnt/md0/database/iphop/iPHoP_db_Sept21.tar.gz”

    /mnt/md0/database/iphop/iPHoP_db_Sept21.tar.gz 0%[ ] 631.14M 38.7KB/s 剩余 20h 48m


    I don't know if this is normal.

  2. Liu Songfeng reporter

    Thank you for your help!! The problem no longer arises. We look forward to further use.

  3. Log in to comment