ropensci / rentrez

talk with NCBI entrez using R
https://docs.ropensci.org/rentrez
Other
194 stars 38 forks source link

how to get protein feature information #181

Open tangwei1129 opened 2 years ago

tangwei1129 commented 2 years ago

I tried to extract the protein feature/domain information, such as domain position and domain name, from https://www.ncbi.nlm.nih.gov/gene/5925, see below image as well, would you advice me how to extract such information? Thank you so much, Wei NCI/NIH image

allenbaron commented 2 years ago

What did you try?

tangwei1129 commented 2 years ago

I tried entrez_fetch(db="protein", id = "NP_000312", rettype="genpept")

It could not locate the information I want. your advice will be really appreciated.

J. Allen Baron @.***> 于2022年7月14日周四 15:43写道:

What did you try?

— Reply to this email directly, view it on GitHub https://github.com/ropensci/rentrez/issues/181#issuecomment-1184831278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4EHU5BNJMOSRVAGPWJBWLVUBUXXANCNFSM53TK2PTQ . You are receiving this because you authored the thread.Message ID: @.***>

allenbaron commented 1 year ago

In my experience, E-utilities doesn't generally use the NM/NP identifiers. You might try using entrez_link() to access the gene database with your identifier (which appears to be 5925) and request the links to the protein database to get the protein ID you're interested in. Then use that ID in your entrez_fetch() command.