Hello everyone, I tried to use 'xtract' for converting a xml file of taxonomy data, but i got:
$ efetch -db taxonomy -id 10090 -format xml | xtract -Pattern Taxon -first TaxId ScientificName GenbankCommonName Division
Unable to locate xtract executable. Please execute the following:
ftp-cp ftp.ncbi.nlm.nih.gov /entrez/entrezdirect xtract.Linux.gz gunzip -f xtract.Linux.gz chmod +x xtract.Linux
I tried to do this, but i still the same.
I hope what I have requested is possible.
2 answers
Try a fresh download of Entrez Direct. The current version has an xtract wrapper that launches the appropriate precompiled binary, in this case xtract.Linux.
Xtract was rewritten two years ago, replacing the original Perl implementation, and now always handles recursive data structures. Thus, the capitalized -Pattern is deprecated in favor of the normal -pattern. Furthermore, by default it will only show the top-level data. Additional exploration with -group or -block can go down one level at a time (e.g., -block /Taxon), or do a recursive exploration of each level for deeply-nested data (e.g., -block */Gene-commentary_accession).
The executable appears to be named xtract.linux. You could try cp -pi xtract.linux xtract and see if that works.
Log in to answer this question.