Skip to content

initializing conda #25

@nick-youngblut

Description

@nick-youngblut

None of the profiles seem to include an initialization of conda, such as . ~.bashrc in which with the .bashrc includes the standard setup:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/ebio/abt3_projects/software/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/ebio/abt3_projects/software/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/ebio/abt3_projects/software/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/ebio/abt3_projects/software/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

How does one use conda with any of the snakemake profiles? I've always used the following for my sge profile job script template:

#!/bin/bash
export OMP_NUM_THREADS=1
# properties = {properties}
 . ~/.bashrc
{exec_job}

... but since snakemake>5.25 I've been getting Perl and Python sys path issues (snakemake/snakemake#786). I was wondering if this is due to my job script (eg., may initializing conda isn't needed?). However, if I remove . ~/.bashrc from my job template script, all of the qsub jobs submitted by snakemake die and do not produce a log file. The sge stdout file is empty and the stderr file just contains the standard info, for example:

Building DAG of jobs...
Using shell: /bin/bash
Provided cores: 128
Rules claiming more threads will be scaled down.
Job counts:
	count	jobs
	1	validate_read2
	1
Select jobs to execute...
WorkflowError:
Failed to solve the job scheduling problem with pulp. Please report a bug and use --scheduler greedy as a workaround:
Pulp: Error while trying to execute, use msg=True for more detailscbc

I'm currently running snakemake 5.30.1. The cluster is running Ubuntu 18.04.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions