So the task I want to accomplish is given a set of nuccore ids e.g. {NG_060216.1,NG_033828.1,HG994383.1} which entrys represent a full genome?
My approach so far is:
esearch -db nuccore -query "NG_060216.1,NG_033828.1,HG994383.1" | elink -target genome
which returns
<ENTREZ_DIRECT>
<Db>genome</Db>
<WebEnv>MCID_623d7cc3a6be7950e21eb738</WebEnv>
<QueryKey>3</QueryKey>
<Count>1</Count>
<Step>2</Step>
</ENTREZ_DIRECT>
Which shows that only one of the querys can be linked to the genome database. Now the question is what is the command to retrieve the orignal querykeys that can be linked or not linked.
Thanks John
1 answer
None of your example accessions "represent a full genome". That said, you can get the scope of what links to a given database can be found here: https://eutils.ncbi.nlm.nih.gov/entrez/query/static/entrezlinks.html
Alternately, you can do something like this:
$ einfo -db nuccore | xtract -pattern Link -element Name,Description,DbTo | head -n5
nuccore_assembly Assembly assembly
nuccore_assembly_wgscontig Assembly assembly
nuccore_biocollections BioCollections biocollections
nuccore_bioproject Related BioProject entry bioproject
nuccore_bioproject_reference Reference Genome BioProject bioproject
If you are interested in links between nuccore and assembly, you would then run elink as follows:
esearch -db nuccore -query <...> | elink -target assembly -name nuccore_assembly <...>
Log in to answer this question.
You could get an idea of what the accession represents by doing
But I would like to do this automatically and not by hand.
Above was an example. You will need to create a
forloop or some other construct to do this for multiple queries. There is also theepostmethod that you can lookup to do this.