I've been stuck for a few hours on this. I'm using reutils and I want to use efetch to get accession numbers given a UID, but it seems to be returning the gene. How do I get it to return the accession number? This is what I tried:
UIDs<-esearch( term = "Methylation", db ="protein" )
accession_numbers = efetch(UIDs, rettype = "acc")
But then it returns:
Object of class ‘efetch’
... EFetch query using the ‘protein’ database. Query url: ‘https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?=efetch&db=protein&id=751130466%2C747165384%2C7465763...’ Retrieval type: ‘acc’, retrieval mode: ‘text’
Do I have to use epost or something?