# HG changeset patch
# User scottx611x
# Date 1466709090 14400
# Node ID b47ce1c4373e1fc01abeefab611ade3d1620e0bb
# Parent 096657afd1378f3b66aeb230c0cfd0b5b2c24e03
planemo upload
diff -r 096657afd137 -r b47ce1c4373e data_manager_gene_annotation/data_manager/data_manager.py
--- a/data_manager_gene_annotation/data_manager/data_manager.py Thu Jun 23 14:25:15 2016 -0400
+++ b/data_manager_gene_annotation/data_manager/data_manager.py Thu Jun 23 15:11:30 2016 -0400
@@ -12,7 +12,6 @@
dest='output',
action='store',
help='JSON filename',
- default="gene_annotation.json"
)
parser.add_argument('--name',
dest='name',
@@ -30,10 +29,12 @@
def url_download(url, name):
+ # Good to note here that requests will automatically handle
+ # content_encoding types: "gzip" and "deflate"
response = requests.get(url=url, stream=True)
- # Create path that we will write the file to
- file_path = 'download_{}.dat'.format(name)
+ # Generate file_name
+ file_path = 'gene_annotation_{}'.format(name)
block_size = 10 * 1024 * 1024 # 10MB chunked download
with open(file_path, 'w+') as f:
@@ -53,11 +54,11 @@
# Attempt to download gene annotation file from given url
gene_annotation_file_path = url_download(args.url, args.name)
- # Update Data Manager Json and write out
+ # Update Data Manager JSON and write to file
data_manager_entry = {
'data_tables': {
'gene_annotation': {
- 'date': str(datetime.datetime.now()),
+ 'value': str(datetime.datetime.now()),
'dbkey': str(args.name),
'name': str(args.name),
'path': gene_annotation_file_path,
diff -r 096657afd137 -r b47ce1c4373e data_manager_gene_annotation/data_manager/gene_annotation/gene_annotation.json
--- a/data_manager_gene_annotation/data_manager/gene_annotation/gene_annotation.json Thu Jun 23 14:25:15 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-{"data_tables": {"gene_annotation": {"date": "2016-06-22 15:48:23.783455", "path": "download_a340d4c9-041a-4583-b970-20f949c53872.dat", "name": "a340d4c9-041a-4583-b970-20f949c53872", "dbkey": "a340d4c9-041a-4583-b970-20f949c53872"}}}
\ No newline at end of file
diff -r 096657afd137 -r b47ce1c4373e data_manager_gene_annotation/data_manager/gene_annotation_fetcher.xml
--- a/data_manager_gene_annotation/data_manager/gene_annotation_fetcher.xml Thu Jun 23 14:25:15 2016 -0400
+++ b/data_manager_gene_annotation/data_manager/gene_annotation_fetcher.xml Thu Jun 23 15:11:30 2016 -0400
@@ -16,11 +16,17 @@
]]>
-
+
+
+
+
+
+
+
+
diff -r 096657afd137 -r b47ce1c4373e data_manager_gene_annotation/data_manager_conf.xml
--- a/data_manager_gene_annotation/data_manager_conf.xml Thu Jun 23 14:25:15 2016 -0400
+++ b/data_manager_gene_annotation/data_manager_conf.xml Thu Jun 23 15:11:30 2016 -0400
@@ -4,12 +4,13 @@