bhattlab / MGEfinder

A toolbox for identifying mobile genetic element (MGE) insertions from short-read sequencing data of bacterial isolates.
MIT License
105 stars 16 forks source link

I have a problem when i use method 1 to install MGEfinder! #22

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, thanks for the wonderfull tool you have developed for exploring MGE!
i failed to use the Method 1 to install MGEfinder, it shows:

(base) lkj666@Cool:~/software/MGEfinder$ bash install.sh 
Removing mgefinder environment if already installed...
Installing mgefinder environment...
Collecting package metadata (repodata.json): \ install.sh:行 13: 727048 killed               conda env create -f env/conda_linux64.yaml
Installation Complete.

Before running mgefinder, activate the mgefinder environment with
> conda activate mgefinder

You can then run mgefinder by typing
> mgefinder [command]
Send any questions to mdurrant@stanford.edu

can you give me some advices? thank you

JacobGYH commented 3 years ago

I have also faced this problem when executing MGEfinder. Any advice? Thank you.

(mgefinder) Jacobs-MacBook-Pro:MGEfinder jacob$ mgefinder --help
#### CHECKING DEPENDENCIES ####
Current version of snakemake: 3.13.3
Expected version of snakemake: 3.13.3
Current version of einverted: EMBOSS:6.6.0.0
Expected version of einverted: EMBOSS:6.6.0.0
Traceback (most recent call last):
  File "/Users/jacob/miniconda3/envs/mgefinder/bin/mgefinder", line 5, in <module>
    from mgefinder.main import cli
  File "/Users/jacob/miniconda3/envs/mgefinder/lib/python3.6/site-packages/mgefinder/main.py", line 38, in <module>
    check_dependencies()
  File "/Users/jacob/miniconda3/envs/mgefinder/lib/python3.6/site-packages/mgefinder/dependencies.py", line 39, in check_dependencies
    bowtie2_checker.check(extract_version=lambda x: x.split()[2])
  File "/Users/jacob/miniconda3/envs/mgefinder/lib/python3.6/site-packages/mgefinder/dependencies.py", line 12, in check
    output = shell(cmd.format(tool=self.tool), read=True).decode('utf-8').strip()
  File "/Users/jacob/miniconda3/envs/mgefinder/lib/python3.6/site-packages/snakemake/shell.py", line 88, in __new__
    raise sp.CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bowtie2 --version 2>&1' returned non-zero exit status 255.
durrantmm commented 3 years ago

@JacobGYH Looks like a bowtie2 version error, what version is your bowtie2?

durrantmm commented 3 years ago

@lkj66666 what type of machine are you using? Is it linux?

JacobGYH commented 3 years ago

@durrantmm I managed to get it working after sorting out the bowtie2 version! Thank you, appreciate it.

loulanomics commented 2 years ago

@JacobGYH @durrantmm, can you explain how you sorted out the bowtie2 version? I'm getting the same error message.

I re-installed bowtie2 (conda install bowtie2) in the mgefinder venv to no avail. I'm using OSX Big Sur 11.6.

(mgefinder) Lous-iMac:MGEfinder loulamartina$ mgefinder --help
#### CHECKING DEPENDENCIES ####
Current version of snakemake: 3.13.3
Expected version of snakemake: 3.13.3
Current version of einverted: EMBOSS:6.6.0.0
Expected version of einverted: EMBOSS:6.6.0.0
Traceback (most recent call last):
  File "/Users/loulamartina/miniconda3/envs/mgefinder/bin/mgefinder", line 5, in <module>
    from mgefinder.main import cli
  File "/Users/loulamartina/miniconda3/envs/mgefinder/lib/python3.6/site-packages/mgefinder/main.py", line 38, in <module>
    check_dependencies()
  File "/Users/loulamartina/miniconda3/envs/mgefinder/lib/python3.6/site-packages/mgefinder/dependencies.py", line 39, in check_dependencies
    bowtie2_checker.check(extract_version=lambda x: x.split()[2])
  File "/Users/loulamartina/miniconda3/envs/mgefinder/lib/python3.6/site-packages/mgefinder/dependencies.py", line 12, in check
    output = shell(cmd.format(tool=self.tool), read=True).decode('utf-8').strip()
  File "/Users/loulamartina/miniconda3/envs/mgefinder/lib/python3.6/site-packages/snakemake/shell.py", line 88, in __new__
    raise sp.CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bowtie2 --version 2>&1' returned non-zero exit status 255.

It looks like the bowtie2 executable?

(mgefinder) Lous-iMac:MGEfinder loulamartina$ bowtie2 --help
(ERR): Description of arguments failed!
Exiting now ...

Which works outside the venv...

(base) Lous-iMac:MGEfinder loulamartina$ bowtie2 --version
/Users/loulamartina/miniconda3/bin/bowtie2-align-s version 2.4.5
...

Thank you!

loulanomics commented 2 years ago

Fixed -

  1. download sourceforge version 2.3.5 of bowtie2 - I just put it in my miniconda/envs/mgefinder directory

  2. unzip. I needed to give it permission to open

  3. copy and paste all executables from bowtie2-2.3.5-macos-x86_64/bin (bowtie2, bowtie2, align-l, bowtie2-align-l-debug, bowtie2-align-s, bowtie2-align-s-debug, bowtie2-build, bowtie2, build-l, bowtie2-build-l-debug, bowtie2-build-s, bowtie2-build-s-debug, bowtie2-inspect, bowtie2, inspect-l, bowtie2-inspect-l-debug, bowtie2-inspect-s, bowtie2-inspect-s-debug) to miniconda/envs/mgefinder/bin

So it works now...

$ bowtie2 --version
/Users/loulamartina/miniconda3/envs/mgefinder/bin/bowtie2-align-s version 2.3.5
64-bit
Built on pluto.fios-router.home
Sat Mar 16 00:22:13 EDT 2019
Compiler: InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Options: -O3 -m64 -msse2 -funroll-loops -g3 -std=c++98 -mmacosx-version-min=10.9 -DPOPCNT_CAPABILITY -DWITH_TBB -DNO_SPINLOCK -DWITH_QUEUELOCK=1
Sizeof {int, long, long long, void*, size_t, off_t}: {4, 8, 8, 8, 8, 8}

$ mgefinder --help
#### CHECKING DEPENDENCIES ####
Current version of snakemake: 3.13.3
Expected version of snakemake: 3.13.3
Current version of einverted: EMBOSS:6.6.0.0
Expected version of einverted: EMBOSS:6.6.0.0
Current version of bowtie2: 2.3.5
Expected version of bowtie2: 2.3.5
Current version of samtools: 1.9
Expected version of samtools: 1.9
Current version of cd-hit: 4.8.1
Expected version of cd-hit: 4.8.1
...