Repository 'data_manager_fetch_gene_annotation'
hg clone https://toolshed.g2.bx.psu.edu/repos/scottx611x/data_manager_fetch_gene_annotation

Changeset 16:9002c2f64e2a (2016-06-22)
Previous changeset 15:6261b513ae1b (2016-06-22) Next changeset 17:57b716eee99f (2016-06-22)
Commit message:
Uploaded
modified:
data_manager_gene_annotation/data_manager/data_manager.py
b
diff -r 6261b513ae1b -r 9002c2f64e2a data_manager_gene_annotation/data_manager/data_manager.py
--- a/data_manager_gene_annotation/data_manager/data_manager.py Wed Jun 22 16:25:38 2016 -0400
+++ b/data_manager_gene_annotation/data_manager/data_manager.py Wed Jun 22 16:35:28 2016 -0400
b
@@ -30,14 +30,11 @@
 
 
 def url_download(url, name,  workdir):
-    # Create path if it doesn't exist
-    if not os.path.exists(workdir):
-        os.makedirs(workdir)
 
     response = requests.get(url=url, stream=True)
 
     # Create path that we will write the file to
-    file_path = os.path.join(workdir, 'download_{}.dat'.format(name))
+    file_path = 'download_{}.dat'.format(name)
 
     block_size = 10 * 1024 * 1024  # 10MB chunked download
     with open(file_path, 'w+') as f:
@@ -56,7 +53,7 @@
     workdir = os.path.join(os.getcwd(), 'gene_annotation')
 
     # Attempt to download gene annotation file from given url
-    gene_annotation_file_path = url_download(args.url, args.name, workdir)
+    gene_annotation_file_path = url_download("http://www.scott-ouellette.com/gene_annotations/chr1-hg19_genes.gtf", args.name, workdir)
 
     # Update Data Manager Json and write out
     data_manager_entry = {
@@ -65,7 +62,6 @@
                 'date': str(datetime.datetime.now()),
                 'dbkey': str(args.name),
                 'name': str(args.name),
-                'path': gene_annotation_file_path,
             }
         }
     }