This is a test version of Biostars. For the public version, visit https://www.biostars.org.
using packages with conda

Hello everyone

I ran

conda create -n scinkd -c conda-forge -c bioconda r-base r-dplyr r-ggplot2 snakemake meryl pigz samtools

conda init bash

conda activate scinkd

But then I wanted to use the package snakemake and ran

snakemake --use-conda   -np -s SCINKD/SCINKD.v2.1.0.FULL.snakefile

And I got the message

bash: snakemake: command not found

I'm following the SCINKD pipeline but they never mention needing to load anything else. What am I missing? After loading packages to conda do I have to manually load the ones I need to use?

Thanks

snakemake conda scinkd

Cannot reproduce. Is this run via some sort of server/HPC/scheduler/something?

Yes, I'm using SSH session

Just to be sure: You ssh into a remote server, correct? Die you setup the conda environment on your local machine or the remote? Must be the remote.

1 answer

The issue likely stems from conda init bash not fully taking effect in your current SSH session. Conda modifies your ~/.bashrc file, but changes aren't applied until you reload the shell.

Try sourcing your bashrc file after activation:

source ~/.bashrc

Then, verify if snakemake is accessible with which snakemake. If it's still not found, log out of SSH and log back in to start a fresh session where conda's paths are properly loaded.

Ensure the environment was created on the remote server, not locally. You can check installed packages with conda list inside the activated env to confirm snakemake is there.

No need to manually load packages beyond activation—conda handles the PATH. If issues persist, update conda (conda update conda) and recreate the env, as older versions sometimes glitch with snakemake.

This should resolve it without additional tools.

Kevin

Log in to answer this question.