Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using profile without using --conda-not-block-search-path-envvars #26

Open
nick-youngblut opened this issue Jan 26, 2021 · 0 comments
Open

Comments

@nick-youngblut
Copy link

At least for snakemake 5.32, I can't use my snakemake SGE profile without using the new parameter --conda-not-block-search-path-envvars. If I don't provide the parameter, I get an import error when snakemake calls my job submission script:

Traceback (most recent call last):
  File "/ebio/abt3_projects/software/dev/ll_pipelines/llmgqc/bin/ll_pipeline_utils/profiles/sge/sge-submit.py", line 7, in <module>
    from snakemake.utils import read_job_properties
ModuleNotFoundError: No module named 'snakemake'

The top of my job submission script:

#!/usr/bin/env python3
import os
import sys
import re
import subprocess

from snakemake.utils import read_job_properties

My sge-jobscript.sh:

#!/bin/bash
export OMP_NUM_THREADS=1
# properties = {properties}
if [[ -f ~/.bashrc &&  $(grep -c "__conda_setup=" ~/.bashrc) -gt 0 && $(grep -c "unset __conda_setup" ~/.bashrc) -gt 0 ]]; then
   echo "Sourcing .bashrc" 1>&2
   . ~/.bashrc
else
   echo "Exporting conda PATH" 1>&2
   export PATH=/ebio/abt3_projects/software/dev/miniconda3_dev/bin:$PATH
fi

How do I avoid having to use --conda-not-block-search-path-envvars every time I run snakemake? I tried adding conda activate snakemake to the bottom of my sge-jobscript.sh, but that didn't help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant