Created
February 25, 2016 05:55
-
-
Save kzfm/f0fa3ec38c3f82ff2021 to your computer and use it in GitHub Desktop.
draget ver0.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/env python | |
import requests | |
import sys | |
from pyquery import PyQuery as pq | |
def get_result(acc): | |
r = requests.get("http://trace.ddbj.nig.ac.jp/DRASearch/run?acc={}".format(acc)) | |
d =pq(r.content) | |
d = d("#detail_header") | |
d = d(".header_link:first") | |
return d("a").attr("href") | |
if __name__ == '__main__': | |
ACC = sys.argv[1] | |
URL = get_result(ACC) | |
print "{}/{}.fastq.bz2".format(URL, ACC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment