NCBI edirect efetch error
1
0
Entering edit mode
5.6 years ago

Hello All, I am trying to obtain all the species names from the blast output file which contains the accession numbers. I tried to use efetch command from NCBI edirect. The command is: efetch -db taxonomy -id CP00001 but it gives an error saying 500 Can't connect to proxy. I have already set "https_proxy" as an environment variable in my bash.rc file. But I am facing the same error. How should I fix this ? Is there a way in which I can get the species names directly when running blast ? I tried to run it with taxdb but it gave me all N/As in the species column. Thanks for your help.

software error NCBI Taxonomy • 3.0k views
ADD COMMENT
0
Entering edit mode

Which version of NCBI edirect utils are you using? If you are using preformatted BLAST databases or have used taxdb when building custom BLAST databases then you may be able to use sscinames in tabular blast output format. See Table C1 for more info https://www.ncbi.nlm.nih.gov/books/NBK279684/

ADD REPLY
0
Entering edit mode

Thanks for your reply. I am using preformatted "NT database" from NCBI. This was already existing. I downloaded edirect from the command line options given here https://www.ncbi.nlm.nih.gov/books/NBK179288/

ADD REPLY
1
Entering edit mode

If you are using the preformatted NCBI BLAST nt databases then you can specify -outfmt 6 'qaccver saccver pident length mismatch gapopen qstart qend sstart send evalue bitscore sscinames' parameter to extract scientific names in the command line BLAST.

ADD REPLY
0
Entering edit mode

I used the same code previously. But it only gives "N/A" in the sscinames column.

ADD REPLY
0
Entering edit mode

Is the taxonomy database present in same directory as your NT files?

ADD REPLY
0
Entering edit mode

Yes. It is in the same directory.

ADD REPLY
0
Entering edit mode

can you please specify the complete command ?

ADD REPLY
0
Entering edit mode

I don't have any proxy set up and I can connect without problems with efetch. Do you really need to set-up "https_proxy"?

efetch -db taxonomy -id CP00001
1. root
  
ADD REPLY
0
Entering edit mode

i tried the same command with the -id CP012354 but it gives me a wrong species name. It gives "Enterobacteria phage ST viruses" where as it should be "Bacteria Actinobacteria Propionibacteriales"

ADD REPLY
0
Entering edit mode
5.5 years ago
h.mon 35k

if you are searching the taxonomy db, you have to pass a taxid, not a nucleotide accession. You have to do something like:

elink -db nucleotide -id CP012354 -target taxonomy \
>   | efetch -format docsum \
>   | xtract -pattern DocumentSummary -if Rank -equals species -element Genus,Species

Note that my skills with the E-Utils are limited, and there may be better ways of retrieving the information you want.

ADD COMMENT
1
Entering edit mode

This is simpler. TaxID are always numeric so when using accession numbers it would be better to do this.

$ efetch -db nuccore -id "CP012354" -format docsum | xtract -pattern DocumentSummary -element Organism
Cutibacterium acnes
$ efetch -db nuccore -id "CP000001" -format docsum | xtract -pattern DocumentSummary -element Organism
Bacillus cereus E33L
ADD REPLY
0
Entering edit mode

Thanks. I will try both of these

ADD REPLY

Login before adding your answer.

Traffic: 1961 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