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

I have installed EDirect according to the online NCBI instructions (Unix) but am getting error messages that the command is not found.

I followed the instructions here: https://dataguide.nlm.nih.gov/edirect/install.html

And it worked for that session of using the terminal, but now it's not working again.

I'm new to bioinformatics, and any advice would be much appreciated!

snp

Hi,

this seems related with a path problem. Where did you install the program? In your home folder?

António

Hi,

Whrn I installed Edirect using instructions, I don't get any message about whether it is installed or not. I'm trying to learn myself to bioinformatic. Please help!!!

enter image description here

Please install using conda if you are new to the command line or do not have admin privileges for your account.

https://bioconda.github.io/

Tutorial for conda part from: Creating workflows with snakemake and conda

After installing conda you can install entrez-direct by doing

conda create -n edirect -c bioconda entrez-direct
conda activate edirect

At this point you will be able to use Entrez-direct.

Thank you for advice but unfortunately, I wrote the script (efetch -db=nuccore -format=fasta -id=AF086833 > AF086833.fa) according to, "The Biostar Handbook 2nd Edition", but I got this message. Unrecognized option -db=nuccore

There are no = signs in the command. Correct command is

efetch -db nuccore -format fasta -id AF086833 > AF086833.fa

alas efetch used to recommend using = and accepted both, spaces and = as separators

when they rewrote efetch they did away with using = so the behavior is not backward compatible

the book has been updated in the meantime, but evidently older version of the book still exists (or perhaps some examples still use =)

This error is probably caused by you running some other installation as root and that either changed the permissions on your `~/.bash_profile' or changed the ownership of the file

that's something not all that desirable.

Check the status of the file with:

ls -l ~/.bash_profile

you should change back the permissions (the ownership of the file) to your account

sudo chown ozgun ~/.bash_profile
chmod +w ~/.bash_profile

Thank you for your advice. When I try to script the code (sudo chown ozgun ~/.bash_profile chmod +w ~/.bash_profile) I got this message. chown: chmod: No such file or directory chown: +w: No such file or directory

Where am i doing wrong. At least, I'm thinking of the format to my Mac.

You are probably using zsh (Z shell) as default on your mac. You could explicitly change to bash shell and then try to install the program again since original directions are for bash shell.

1 answer

And it worked for that session of using the terminal, but now it's not working again.

Looks like you did not append the location of the installation to your $PATH variable. This line from install instructions.

echo "export PATH=\$PATH:\$HOME/edirect" >> $HOME/.bash_profile

Find directory where you installed the program. Then add that location to your shell start-up file (in case of bash it would be .bashrc or .bash_profile) by doing export PATH=$PATH:/directory_w_entrezdirect_progs.

Log in to answer this question.