Entering edit mode
4.6 years ago
Frieda
▴
60
Dear reader!
I intend to retrieve the taxonomy for some accession numbers in NCBI using the following command:
Using the following example: https://www.ncbi.nlm.nih.gov/protein/XP_018619665.1
I run this command:
esearch -db protein -query "XP_018619665.1" | elink -target taxonomy | efetch -format native -mode xml | grep ScientificName | awk -F ">|<" 'BEGIN{ORS=", ";}{print $3;}'
The above example returns:
"QueryKey value not found in fetch input"
I believe the reason is that the sequence has been updated.
I am now wondering how I can handle this kind of error within the terminal or within R? This command is used within R in part of my code.
If you drop the version number your command should work fine:
You could also do something like:
Hello Fardokht!
It appears that your post has been cross-posted to another site: https://stackoverflow.com/questions/60260711
This is typically not recommended as it runs the risk of annoying people in both communities.