Question: How to download datasets from Snpedea.com
0
gravatar for myrezabehboodi
5 weeks ago by
myrezabehboodi10 wrote:

Hi folks, I would appreciate it if could help me to download datasets of Snpedea.com. I have searched 'skin' in the web site

I want to download all rs that apeared in the search? How can I download it by python or whatever?

snp • 98 views
ADD COMMENTlink written 5 weeks ago by myrezabehboodi10

Snpedia will block any direct scrapping attempt on their main website, but you can query bots.snpedia.com using python or R.

More details > https://www.snpedia.com/index.php/Bulk

ADD REPLYlink written 5 weeks ago by Arup Ghosh2.7k

I have run the python code mentioned in Bulk. But it shows this error:

URLError: <urlopen error [Errno -2] Name or service not known> trying request again in 10 seconds
ADD REPLYlink modified 5 weeks ago by RamRS28k • written 5 weeks ago by myrezabehboodi10

Here is the code:

from wikitools import wiki, category

site = wiki.Wiki("http://bots.snpedia.com/api.php")                  # open snpedia
snps = category.Category(site, "Is_a_snp")
snpedia = []

for article in snps.getAllMembersGen(namespaces=[0]):   # get all snp-names as list and print them
    snpedia.append(article.title.lower())
    print article.title
ADD REPLYlink modified 5 weeks ago by RamRS28k • written 5 weeks ago by myrezabehboodi10
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: 786 users visited in the last hour