Mercurial > repos > scottx611x > data_manager_fetch_gene_annotation
comparison data_manager_gene_annotation/data_manager/data_manager.py @ 27:492505471c3f draft
planemo upload
author | scottx611x |
---|---|
date | Thu, 23 Jun 2016 15:46:41 -0400 |
parents | 2f03bb5788e1 |
children | aa89322480a0 |
comparison
equal
deleted
inserted
replaced
26:2f03bb5788e1 | 27:492505471c3f |
---|---|
26 ) | 26 ) |
27 | 27 |
28 args = parser.parse_args() | 28 args = parser.parse_args() |
29 | 29 |
30 | 30 |
31 def url_download(url, name): | 31 def url_download(url): |
32 response = requests.get(url=url, stream=True) | 32 response = requests.get(url=url, stream=True) |
33 | 33 |
34 # Generate file_name | 34 # Generate file_name |
35 file_name = response.url.split("/")[-1] | 35 file_name = response.url.split("/")[-1] |
36 | 36 |
50 | 50 |
51 | 51 |
52 def main(args): | 52 def main(args): |
53 | 53 |
54 # Attempt to download gene annotation file from given url | 54 # Attempt to download gene annotation file from given url |
55 gene_annotation_file_name = url_download(args.url, args.name) | 55 gene_annotation_file_name = url_download(args.url) |
56 | 56 |
57 # Update Data Manager JSON and write to file | 57 # Update Data Manager JSON and write to file |
58 data_manager_entry = { | 58 data_manager_entry = { |
59 'data_tables': { | 59 'data_tables': { |
60 'gene_annotation': { | 60 'gene_annotation': { |