This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Samtools command not found

Hi there!

I installed samtools according to the instructions from here: https://gatk.broadinstitute.org/hc/en-us/articles/360041320571--How-to-Install-all-software-packages-required-to-follow-the-GATK-Best-Practices

I downloaded the samtools tar file version 1.11. Unpacked it with:

tar xvjk samtools-1.11.tar.bz2

Went to the samtools directory with

cd

And then

make

Added it to my path with:

export = PATH="$path/to/folder/:$PATH"

Opened a new shell, and ran

samtools

and I get the error:

samtools command not found

Does anyone know what I am doing wrong here? Thanks.

error

Opened a new shell, and ran

That export command was local to the shell you had open. If you open another shell then you have to export in that shell or add this permanently to your .bashrc or relevant shell file.

BTW command should be

export PATH=$path/to/folder/:$PATH

1 answer

in export = PATH="$path/to/folder/:$PATH" replace "$path/to/folder/" by your actual path to the folder where are located your samtools binaries.

Even in this case the poster may get the same error after opening the new shell, because export command do not carry over. The OP will need to put this export command into .bashrc before opening the new shell, or use samtools in the same shell where the export command was issued.

Thanks for the replies. Even when I use the same shell, I get the same error. Any other ideas? Thanks.

Do you see a file called samtools in the directory (perhaps in bin folder) after you do make. It may be easiest to install samtools using conda.

Thank you so much for the help! I ended up editing the .bashrc and adding samtools to the path that way, and that worked!!! Working fine now.

yes I did do that I just didn't bother to put it in the post haha thx.

Log in to answer this question.