-bash efetch command not found
1
0
Entering edit mode
4.4 years ago

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 • 3.2k views
ADD COMMENT
0
Entering edit mode

Hi,

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

António

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

efetch -db nuccore -format fasta -id AF086833 > AF086833.fa
ADD REPLY
0
Entering edit mode

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 =)

ADD REPLY
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
4.4 years ago
GenoMax 147k

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2207 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6