Question: Query Returns A Different Number Of Results When Fetching With Biopython From Dbsnp
0
gravatar for heath
7.4 years ago by
heath20
United States
heath20 wrote:

Hey all, I have issues on the output of rsid from dbSNP, if i use the website base output for specific terms of the protein I got an list of rsid no# around 13000, http://www.ncbi.nlm.nih.gov/snp/details?querykey=3

(pathogenic[Clinical_Significance] OR probable pathogenic[Clinical_Significance]) AND (nonsense[Function_Class] OR missense[Function_Class] OR frameshift[Function_Class]) AND "Homo sapiens"[Organism]

but if i use the Biopython Entrez ...i get different number for the output rsid list

fh= Entrez.esearch(db='snp', retmax= '15000', term="pathogenic OR probable pathogenic AND nonsens OR missense OR frameshift AND Homo sapiens")
rec=Entrez.read(fh)
rsid_list=rec['IdList']

the len(rsid_list) is 15000?? did I make sth wrong?

Thanks!

dbsnp biopython entrez • 2.3k views
ADD COMMENTlink modified 5.3 years ago by Biostar ♦♦ 20 • written 7.4 years ago by heath20

you do have a typo in what you show at nonsens instead of nonsense

ADD REPLYlink modified 7.4 years ago • written 7.4 years ago by Istvan Albert ♦♦ 84k
2
gravatar for Peter
7.4 years ago by
Peter5.8k
Scotland, UK
Peter5.8k wrote:

You are not using the same search term - your web version included the [field] restrictions and different AND/OR combinations, while the version you used in Biopython did not. Try:

from Bio import Entrez
fh= Entrez.esearch(db='snp', retmax= '15000', term='(pathogenic[Clinical_Significance] OR probable pathogenic[Clinical_Significance]) AND (nonsense[Function_Class] OR missense[Function_Class] OR frameshift[Function_Class]) AND "Homo sapiens"[Organism]')
rec=Entrez.read(fh)
fh.close()
rsid_list=rec['IdList']
print len(rsid_list)

Right now that gives 13035 results.

ADD COMMENTlink written 7.4 years ago by Peter5.8k

Thanks a lot :-) .!

ADD REPLYlink written 7.4 years ago by heath20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1650 users visited in the last hour