Yes! And in the directory ~/edirect the following files exist: xtract, xtract.Darwin, and xtract.go. And giving all permissions (chmod 777) does not help either.
I have been unable to use xtract function from EDirect, as I get the following message simply by typing "xtract" into terminal:
Unable to locate xtract executable. Please execute the following: ftp-cp ftp.ncbi.nlm.nih.gov /entrez/entrezdirect xtract.Darwin.gz gunzip -f xtract.Darwin.gz chmod +x xtract.Darwin
I ran this, but it does not solve the problem. I have tried reinstalling EDirect and changing the xtract.Darwin file name to just xtract as well, but to no success. Any suggestions would be much appreciated.
1 answer
Did you follow the instructions given on this page. Last step of running setup.sh from the edirect directory is important to get this working right.
Is that directory in your $PATH?
export PATH=$PATH: ~/edirect
echo $PATH returns the following:
/Users/username/src/edirect:/Users/username/Documents/SeniorPt1/Lab/miniconda3/bin:/Users/username/miniconda3/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/username/edirect:/Users/username/edirect:/Users/username/edirect:/Users/username/edirect::/edirect:
Are you using an account called username? Or did you just replace the real name with a dummy word? I assume the path is not permanently set like that. Can you open a new terminal window and do export PATH=$PATH: ~/edirect to see if that fixes the strange multiple entry path above?
Yes, just replacing it with a dummy word.
Thank you so much, that fixed the problem! It works now!
Hi, I'm having the exact same issue but having trouble understanding your proposed solution.
echo $PATH returns:
/Users/luke/src/edirect:/Users/luke/perl5/perlbrew/bin:/Users/luke/perl5/perlbrew/perls/perl-5.28.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/luke/edirect:/Users/luke
Opening a new terminal and executing:
export PATH=$PATH: ~/edirect
returns:
-bash: export: `/Users/luke/edirect': not a valid identifier
Any help is appreciated!
That probably means the last step I mentioned in the original answer has not been executed.
What do you see when you do ls -lh ~/edirect?
total 18192
-rw-r--r-- 1 luke staff 149K Aug 24 15:21 Mozilla-CA.tar.gz
-rw-r--r-- 1 luke staff 2.5K Oct 22 2016 README
-rwxr-xr-x 1 luke staff 526B Oct 24 2016 amino-acid-composition
-rwxr-xr-x 1 luke staff 1.5K Jul 27 12:50 archive-pubmed
-rwxr-xr-x 1 luke staff 2.3K Aug 12 2017 asp-cp
-rwxr-xr-x 1 luke staff 647B Jan 16 2018 asp-ls
drwxr-xr-x 5 luke staff 160B Sep 1 19:29 aux
-rwxr-xr-x 1 luke staff 88B Oct 24 2016 between-two-genes
-rw-r--r-- 1 luke staff 85K Aug 20 11:25 common.go
-rwxr-xr-x 1 luke staff 742B Feb 18 2018 download-pubmed
-rwxr-xr-x 1 luke staff 533B Oct 24 2017 download-sequence
-rwxr-xr-x 1 luke staff 265B Jan 8 2015 eaddress
-rwxr-xr-x 1 luke staff 263B Aug 5 14:00 eblast
-rwxr-xr-x 1 luke staff 266B Oct 29 2016 ecitmatch
-rwxr-xr-x 1 luke staff 265B Mar 20 2013 econtact
-rwxr-xr-x 1 luke staff 117K Aug 16 12:50 edirect.pl
-rwxr-xr-x 1 luke staff 2.6K Jan 16 2018 edirutil
-rwxr-xr-x 1 luke staff 263B Mar 20 2013 efetch
-rwxr-xr-x 1 luke staff 264B Mar 20 2013 efilter
-rwxr-xr-x 1 luke staff 262B Mar 20 2013 einfo
-rwxr-xr-x 1 luke staff 262B Mar 20 2013 elink
-rwxr-xr-x 1 luke staff 264B Mar 20 2013 enotify
-rwxr-xr-x 1 luke staff 3.4K May 17 2017 entrez-phrase-search
-rwxr-xr-x 1 luke staff 262B Mar 20 2013 epost
-rwxr-xr-x 1 luke staff 263B Mar 20 2013 eproxy
-rwxr-xr-x 1 luke staff 264B Mar 20 2013 esearch
-rwxr-xr-x 1 luke staff 263B Sep 8 2014 espell
-rwxr-xr-x 1 luke staff 278B Feb 10 2014 esummary
-rwxr-xr-x 1 luke staff 1.2K Jun 5 21:25 fetch-pubmed
-rwxr-xr-x 1 luke staff 903B Nov 21 2016 filter-stop-words
-rwxr-xr-x 1 luke staff 955B Jan 16 2018 ftp-cp
-rwxr-xr-x 1 luke staff 637B Jan 16 2018 ftp-ls
-rwxr-xr-x 1 luke staff 13K Jan 16 2018 gbf2xml
-rwxr-xr-x 1 luke staff 1.1K Aug 12 2017 has-asp
-rwxr-xr-x 1 luke staff 2.0K Jul 27 12:50 index-pubmed
-rwxr-xr-x 1 luke staff 112B May 24 11:50 intersect-uid-lists
-rwxr-xr-x 1 luke staff 45B Aug 31 2014 join-into-groups-of
-rwxr-xr-x 1 luke staff 2.5K Aug 21 16:50 local-phrase-search
-rwxr-xr-x 1 luke staff 10K Jan 16 2018 nquire
-rwxr-xr-x 1 luke staff 331B Jun 21 19:50 pm-clean
-rwxr-xr-x 1 luke staff 493B Jul 28 21:25 pm-current
-rwxr-xr-x 1 luke staff 187B Mar 18 21:01 pm-erase
-rwxr-xr-x 1 luke staff 371B Jul 13 20:00 pm-index
-rwxr-xr-x 1 luke staff 393B Aug 20 11:25 pm-invert
-rwxr-xr-x 1 luke staff 525B Feb 17 2018 pm-log
-rwxr-xr-x 1 luke staff 446B Aug 20 11:25 pm-merge
-rwxr-xr-x 1 luke staff 1.8K Jul 19 17:50 pm-prepare
-rwxr-xr-x 1 luke staff 479B Aug 20 11:25 pm-promote
-rwxr-xr-x 1 luke staff 959B Jun 25 12:00 pm-refresh
-rwxr-xr-x 1 luke staff 643B Apr 3 03:00 pm-repack
-rwxr-xr-x 1 luke staff 1.6K Aug 7 15:00 pm-stash
-rwxr-xr-x 1 luke staff 188B Mar 18 21:01 pm-uids
-rwxr-xr-x 1 luke staff 89B Apr 24 13:25 pm-verify
-rwxr-xr-x 1 luke staff 107B Aug 5 15:00 protein-neighbors
-rwxr-xr-x 1 luke staff 690B Apr 2 14:50 rchive
-rwxr-xr-x 1 luke staff 4.5M Sep 1 23:35 rchive.Darwin
-rw-r--r-- 1 luke staff 129K Aug 24 14:00 rchive.go
-rwxr-xr-x 1 luke staff 173B Jan 14 2015 reorder-columns
-rwxr-xr-x 1 luke staff 2.6K Jan 16 2018 run-ncbi-converter
-rw-r--r-- 1 luke staff 51K Sep 1 23:35 setup-deps.log
-rwxr-xr-x 1 luke staff 2.4K Jan 16 2018 setup-deps.pl
-rwxr-xr-x@ 1 luke staff 2.6K Apr 2 14:50 setup.sh
-rwxr-xr-x 1 luke staff 200B Oct 27 2016 sort-uniq-count
-rwxr-xr-x 1 luke staff 249B Apr 16 13:00 sort-uniq-count-rank
-rwxr-xr-x 1 luke staff 1.0K Jun 5 21:25 stream-pubmed
-rwxr-xr-x 1 luke staff 80B Jul 14 2015 word-at-a-time
-rwxr-xr-x 1 luke staff 690B Apr 2 14:50 xtract
-rwxr-xr-x 1 luke staff 3.3M Sep 1 23:35 xtract.Darwin
-rw-r--r-- 1 luke staff 203K Aug 21 12:50 xtract.go
-rwxr-xr-x 1 luke staff 1.3K Apr 15 15:25 xy-plot
Make sure there is no space between $PATH: and directory name.
export PATH=$PATH:~/edirect
Progress.
It did not return:
-bash: export: `/Users/luke/edirect': not a valid identifier.
However, I still get the original error message from the OP and myself:
Unable to locate xtract executable. Please execute the following:
ftp-cp ftp.ncbi.nlm.nih.gov /entrez/entrezdirect xtract.Darwin.gz
gunzip -f xtract.Darwin.gz
chmod +x xtract.Darwin
And executing this does not seem to fix the problem.
echo $PATH returns:
/Users/luke/src/edirect:/Users/luke/perl5/perlbrew/bin:/Users/luke/perl5/perlbrew/perls/perl-5.28.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/luke/edirect:/Users/luke:/Users/luke/edirect
@genomax, I can't thank you enough for helping me work through this!
Just to confirm. You are using macOS? These executables are for macOS.
What do you get from which xtract and xtract -h or --help?
Correct. macOS High Sierra 10.13.6
which xtract returns:
/Users/luke/src/edirect/xtract
xtract -h returns:
Unable to locate xtract executable. Please execute the following:
ftp-cp ftp.ncbi.nlm.nih.gov /entrez/entrezdirect xtract.Darwin.gz
gunzip -f xtract.Darwin.gz
chmod +x xtract.Darwin
Log in to answer this question.