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
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
sscinamesin tabular blast output format. See Table C1 for more info https://www.ncbi.nlm.nih.gov/books/NBK279684/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/
If you are using the preformatted NCBI BLAST
ntdatabases 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.I used the same code previously. But it only gives "N/A" in the sscinames column.
Is the taxonomy database present in same directory as your NT files?
Yes. It is in the same directory.
can you please specify the complete command ?
can you please specify the complete command ?
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"?
i tried the same command with the
-id CP012354but it gives me a wrong species name. It gives "Enterobacteria phage ST viruses" where as it should be "Bacteria Actinobacteria Propionibacteriales"