Skip to content

Commit

Permalink
Merge pull request #2 from rki-mf1/conda_fix
Browse files Browse the repository at this point in the history
added conda_dir parameter
  • Loading branch information
DimitriTernovoj authored Aug 24, 2023
2 parents d997ef7 + a385cc2 commit 92ad537
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flupipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def parse_args():
group_out.add_argument('--threads', metavar="INT", help="number of threads to use (default: 1)", type=int, default=1)
group_out.add_argument('--run_id', metavar="STR", help="run ID (default: None)", type=str, default=None)
group_out.add_argument('-v', '--version', action='version', version='%(prog)s ' + __version__)
group_out.add_argument('--conda_dir', metavar="STR", help="directory to install conda environments to (default: .snakemake)", type=str, default=".snakemake")

return parser.parse_args()

Expand Down Expand Up @@ -221,7 +222,7 @@ def main():
#run snakemake
path = os.path.dirname(os.path.abspath(__file__))
snakefile = os.path.join(path, "flupipe.Snakefile")
cmd = ["snakemake", "-s", snakefile, "--configfile", configfile, "--cores", str(args.threads), "--use-conda" , "--conda-frontend", "mamba", "--rerun-incomplete", "--nolock"]
cmd = ["snakemake", "-s", snakefile, "--configfile", configfile, "--cores", str(args.threads), "--use-conda" , "--conda-frontend", "mamba", "--rerun-incomplete", "--nolock","--conda-prefix",args.conda_dir]
#cmd = ["snakemake", "--dag -s", snakefile, "--configfile", configfile, "--cores", str(args.threads), " | dot -Tsvg > dag.svg"]
print("executing:", " ".join(cmd))
subprocess.Popen(cmd).wait()
Expand Down

0 comments on commit 92ad537

Please sign in to comment.