Going from pubmed esearch to protein fasta sequences: Biopython
0
0
Entering edit mode
2.5 years ago

After I run my esearch in pubmed I return a list of IDs for publications. I found the following info by running einfo on pubmed"

# {'Name': 'pubmed_protein_weighted', 'Menu': 'Protein (Weighted) Links', 'Description': 'Links to protein', 'DbTo': 'protein'}
# {'Name': 'pubmed_snp', 'Menu': 'SNP Links', 'Description': 'PubMed to SNP links', 'DbTo': 'snp'}
# {'Name': 'pubmed_protein_refseq', 'Menu': 'Protein (RefSeq) Links', 'Description': 'Link to Protein RefSeqs', 'DbTo': 'protein'}
# {'Name': 'pubmed_dbvar', 'Menu': 'dbVar', 'Description': 'Link from PubMed to dbVar', 'DbTo': 'dbva

My question is how do I use biopython entrez to link out to respective DBs? Like

 {'Name': 'pubmed_protein_weighted', 'Menu': 'Protein (Weighted) Links', 'Description': 'Links to protein', 'DbTo': 'protein'}?
protein fasta Biopython Entrez • 1.3k views
ADD COMMENT
0
Entering edit mode

Can you provide an example of search terms? Looks like you are simply showing JOSN format link-out information above.

ADD REPLY
0
Entering edit mode
handle = Entrez.esearch(db ="pubmed", retmax = 25, term="gefitinib")
ADD REPLY
0
Entering edit mode

Something like this:

$ esearch -db pubmed -query "gefitinib" | elink -target protein -name pubmed_protein_refseq | esummary | xtract -pattern DocumentSummary -element Caption,Title 
NP_001403494    endothelin-1 isoform 1 preproprotein [Homo sapiens]
NP_001403492    endothelin-1 isoform 1 preproprotein [Homo sapiens]
NP_001403493    endothelin-1 isoform 1 preproprotein [Homo sapiens]
NP_001402068    forkhead box protein O3 isoform 2 [Homo sapiens]
ADD REPLY
0
Entering edit mode

Makes sense! I totally forgot about the 'pipe' to with 'elink'. Much appreciated!

ADD REPLY
0
Entering edit mode

This is good for working in UNIX, but I'm working on editing it for BioPython. Would you happen to have and example?

ADD REPLY

Login before adding your answer.

Traffic: 3465 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6