Previous changeset 18:6a67977a23da (2016-06-22) Next changeset 20:315742ba24f1 (2016-06-22) |
Commit message:
Uploaded |
modified:
data_manager_gene_annotation/data_manager/data_manager.py |
b |
diff -r 6a67977a23da -r 7662f6a989c9 data_manager_gene_annotation/data_manager/data_manager.py --- a/data_manager_gene_annotation/data_manager/data_manager.py Wed Jun 22 16:37:34 2016 -0400 +++ b/data_manager_gene_annotation/data_manager/data_manager.py Wed Jun 22 17:11:05 2016 -0400 |
b |
@@ -29,8 +29,7 @@ args = parser.parse_args() -def url_download(url, name, workdir): - +def url_download(url, name): response = requests.get(url=url, stream=True) # Create path that we will write the file to @@ -50,10 +49,9 @@ def main(args): - workdir = os.path.join(os.getcwd(), 'gene_annotation') # Attempt to download gene annotation file from given url - url_download(args.url, args.name, workdir) + gene_annotation_file_path = url_download(args.url, args.name) # Update Data Manager Json and write out data_manager_entry = { @@ -62,11 +60,12 @@ 'date': str(datetime.datetime.now()), 'dbkey': str(args.name), 'name': str(args.name), + 'path': gene_annotation_file_path, } } } - with open(os.path.join(workdir, args.output), "w+") as f: + with open(os.path.join(args.output), "w+") as f: f.write(json.dumps(data_manager_entry)) if __name__ == '__main__': |