This is a test version of Biostars. For the public version, visit https://www.biostars.org.
efetch returning gene instead of accession number - R

Hi all,

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’

NP_001291387.1

NP_001291215.1

NP_001290430.1

NP_001290428.1

NP_001290167.1

NP_001120963.2

NP_000202.3

NP_004043.3

NP_001289981.1

NP_001615.2

NP_001070745.3

NP_001289462.1

... 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?

Thank you

r

0 answers

No answers yet.

Log in to answer this question.