I am trying to get gene accession numbers from a list of protein ids. For example, if I use AYW77996 id in place of MBB6040371.1, it will return me a result. However, there are certain protein ids like MBB6040371.1 which do return an empty result. When I manually searched this protein ID on NCBI, I can see that it returns two records 1) from refseq, 2) from INSDC. It looks like MBB6040371.1 is an INSDC identifier. Therefore it cannot be directly linked to NCBI gene identifiers.
I think that I have two questions.
1) First one is, how can I handle the empty result thrown when I use a protein query id not present in the protein database.
2) Second one is, what is the way to redirect INSDC identifier to NCBI protein database?
esearch -db protein -query MBB6040371.1 | elink -target nuccore | efetch -format acc