# HG changeset patch
# User fabio
# Date 1498163650 14400
# Node ID bab44ade984c5dc5b13d1ca6c91c968b7d3f4764
# Parent 73d593ff91e44addada924279c7a264394288abe
Uploaded 20170622
diff -r 73d593ff91e4 -r bab44ade984c ._jcds_wrapper.py
Binary file ._jcds_wrapper.py has changed
diff -r 73d593ff91e4 -r bab44ade984c gdcwebapp.xml
--- a/gdcwebapp.xml Thu Jun 22 14:24:50 2017 -0400
+++ b/gdcwebapp.xml Thu Jun 22 16:34:10 2017 -0400
@@ -9,7 +9,11 @@
- json_collect_data_source.py '${__app__.config.output_size_limit}' --json_param_file '${output1}' --path '.' --appdata 'tmp'
+
+
+
Go to GDCWebApp service $GALAXY_URL
diff -r 73d593ff91e4 -r bab44ade984c jcds_wrapper.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jcds_wrapper.py Thu Jun 22 16:34:10 2017 -0400
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+import json_collect_data_source as jcds
+import optparse
+
+__version__ = "1.0.0"
+
+def __main__():
+ """ Read the JSON return from a data source. Parse each line and request
+ the data, download to "newfilepath", and write metadata.
+
+ Schema
+ ------
+
+ [ {"url":"http://url/to/file.tar.gz",
+ "name":"My Archive",
+ "extension":"tar.gz",
+ "organize":"true",
+ "metadata":{"db_key":"hg38"},
+ "extra_data":[ {"url":"http://url_of_ext_file",
+ "path":"rel/path/to/ext_file"}
+ ]
+ }
+ ]
+
+ """
+ # Parse the command line options
+ usage = "Usage: jcds_wrapper.py max_size --json_param_file filename [options]"
+ parser = optparse.OptionParser(usage = usage)
+ parser.add_option("-j", "--json_param_file", type="string",
+ action="store", dest="json_param_file", help="json schema return data")
+ parser.add_option("-p", "--path", type="string",
+ action="store", dest="path", help="new file path")
+ # set appdata: temporary directory in which the archives will be decompressed
+ parser.add_option("-a", "--appdata", type="string",
+ action="store", dest="appdata", help="appdata folder name")
+ parser.add_option("-v", "--version", action="store_true", dest="version",
+ default=False, help="display version and exit")
+
+ (options, args) = parser.parse_args()
+ if options.version:
+ print __version__
+ else:
+ jcds.download_from_json_data( options, args )
+
+
+if __name__ == "__main__": __main__()