bhattlab / MGEfinder

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

Couldn't finish the tutorial #1

Closed yingeddi2008 closed 4 years ago

yingeddi2008 commented 5 years ago

Hi,

Our group (Dr. Pamer's UChicago Lab) is very excited to find a de novo approach to detect MGE. I am running your tutorial just to see how it works. However, I ran into some issues which I have no idea how to fix. It seems there is usage error about the "click" package. Please see the following error message.

I ran the following command as you listed in the tutorial.

$ mgefinder workflow --cores 16 test_workdir/

The following is the error message.

#### PARAMETERS ###
command: workflow
workdir: test_workdir/
snakefile: /home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/workflow/Snakefile
configfile: /home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/workflow/config.yml
cores: 16
memory: 16000
unlock: False
rerun_incomplete: False
keep_going: False
###################
Traceback (most recent call last):
  File "/home/dfi_user/miniconda3/envs/mgefinder/bin/mgefinder", line 11, in <module>
    sys.exit(cli())
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/main.py", line 46, in workflow
    _workflow(workdir, snakefile, configfile, cores, memory, unlock, rerun_incomplete, keep_going)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/workflow.py", line 7, in _workflow
    force_incomplete=rerun_incomplete, keepgoing=keep_going)
TypeError: snakemake() got an unexpected keyword argument 'configfile'

I am running the tutorial inside the mgefinder environment created by miniconda3. What other specs I should provide for you to identify the problem?

Also, what is the purpose of de-duplicating the raw fastq files? I couldn't get hts_SuperDeduper to work yet. Is it OK if I skip that step?

Thanks,

Eddi

yingeddi2008 commented 4 years ago

So I was able to fix the snakemake() got an unexpected keyword argument 'configfile' error message by adding "s" to the configfile argument in the workflow.py line 7 (so inside snakemake command, configfiles = configfile).  However, another error popped up about the configpath in the snakemake package.

$ mgefinder workflow toydir/
#### PARAMETERS ###
command: workflow
workdir: toydir/
snakefile: /home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/workflow/Snakefile
configfile: /home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/workflow/config.yml
cores: 1
memory: 16000
unlock: False
rerun_incomplete: False
keep_going: False
###################
Traceback (most recent call last):
  File "/home/dfi_user/miniconda3/envs/mgefinder/bin/mgefinder", line 11, in <module>
    sys.exit(cli())
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/main.py", line 46, in workflow
    _workflow(workdir, snakefile, configfile, cores, memory, unlock, rerun_incomplete, keep_going)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/mgefinder/workflow.py", line 6, in _workflow
    force_incomplete=rerun_incomplete, keepgoing=keep_going)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/snakemake/__init__.py", line 394, in snakemake
    overwrite_config.update(load_configfile(f))
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/snakemake/io.py", line 1311, in load_configfile
    config = _load_configfile(configpath)
  File "/home/dfi_user/miniconda3/envs/mgefinder/lib/python3.7/site-packages/snakemake/io.py", line 1273, in _load_configfile
    with open(configpath) as f:
IsADirectoryError: [Errno 21] Is a directory: '/'

The path to the config file is correct, but somehow, it is not working. I am sincerely grateful if you could provide some hints.

Thanks,

Eddi

durrantmm commented 4 years ago

Hey Eddi, I am working on improving the README, it is not up to date. How about we set up a google hangout call so I can help you through this specifically? Please email me at mdurrant@stanford.edu.