I am using the following one-liner with NCBI entrez
to query their databases from the terminal (see Entrez Direct: E-utilities on the Unix Command Line:
esearch -db assembly -query ${species name} |
xtract -pattern ENTREZ_DIRECT -element Count
This works a charm but occasionally it sends an xml error that messes up the output.
Here is an example of the error:
xml
FAILURE ( Fri Jan 27 01:12:44 PM CST 2023 )
nquire -url https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ esearch.fcgi -retmax 0 -usehistory y -db assembly -term "Crepis commutata" -tool edirect -edirect 18.7 -edirect_os Linux -email {}
<ErrorList>
<PhraseNotFound>commutata</PhraseNotFound>
<PhraseNotFound>Crepis commutata[All Fields]</PhraseNotFound>
<ErrorList>
SECOND ATTEMPT
Entrez, unfortunately, does not have a man page or --help
entry on my installation for some reason and I am not quite sure where I should change the one-liner to change this behavior.
Does anyone have any clues?