dahak-metagenomics / dahak-taco

🌮 Taco is an experimental command line interface for dahak workflows. https://dahak-metagenomics.github.io/dahak-taco
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Adjust requirements and setup.py required packages #15

Open charlesreid1 opened 6 years ago

charlesreid1 commented 6 years ago

Include Snakemake in required packages. done

How does setup.py handle checking for a conda distribution? (Do we need to do that?) nope

charlesreid1 commented 6 years ago

Related - #4 (was able to check for Snakemake as it is a regular pip-installable package).

Could check for docker vs. singularity (is this the right place?) and build that logic into the rules. See #16 for discussion of how to deal with singularity or docker.

(Use separate install scripts, since docker and singularity are mutually exclusive options.)

charlesreid1 commented 6 years ago

Point 1: we do not need to check whether taco is being installed from a conda distribution, because conda is a layer around python and provides a python environment.

Point 2: we do need to check if there is a conda command available on the system, as Snakemake will use conda directives.

This raises the issue of #18: what happens if there is no conda installed and Snakemake has a conda directive? Would be nice to assume the user has conda installed, but there really should be some way to make sure. Would a simple check for non-empty result from subprocess.call(['which','conda']) do the trick?

charlesreid1 commented 6 years ago

Also related: #16 unwrapping singularity mysteriousness. This is more figuring out conda mysteriousness.

Asked in a couple of places about how to check for an installed conda in a python package, will follow up here with ideas and information. I get the feeling the answer will be, don't build a python package, build a conda package. But we shall see.

charlesreid1 commented 6 years ago

Answer from Luiz: best approach is probably to check if there is a conda on the path, and exit if none found.

Simple subprocess.call(['which','conda']) is not the way to go; use subprocess.check_output():

https://bitbucket.org/snakemake/snakemake/src/b728e910347b4a660aa508596ccd50bb027eedb6/snakemake/conda.py?at=master&fileviewer=file-view-default#conda.py-238:240

charlesreid1 commented 6 years ago

See #25 - approach here should be to separate the compute nodes (which require conda/singularity/possibly other tools) from the master node that runs taco, so we don't even have to install conda in the first place.

Light wrapper around Snakemake.