How to download datasets from Snpedea.com
0
0
Entering edit mode
3.8 years ago

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 • 831 views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 3152 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