changeset 3:172815da3d41 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gemini_database_downloader commit 8652f36a3a3838dca989426961561e81432acf4f
author iuc
date Tue, 04 Apr 2017 18:09:05 -0400
parents 345412d58d75
children fe5a9a7d95b0
files data_manager/data_manager_gemini_download.py data_manager/data_manager_gemini_download.xml tool_data_table_conf.xml.sample tool_dependencies.xml
diffstat 4 files changed, 17 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/data_manager_gemini_download.py	Thu Feb 18 08:49:06 2016 -0500
+++ b/data_manager/data_manager_gemini_download.py	Tue Apr 04 18:09:05 2017 -0400
@@ -1,32 +1,31 @@
 #!/usr/bin/env python
 
-import sys
-import os
+import datetime
 import json
-import shlex
-import datetime
+import os
 import subprocess
+import sys
+
 
 def main():
-
     today = datetime.date.today()
     params = json.loads( open( sys.argv[1] ).read() )
     target_directory = params[ 'output_data' ][0]['extra_files_path']
     os.mkdir( target_directory )
     cmd = "gemini --annotation-dir %s update --dataonly %s %s" % (target_directory, params['param_dict']['gerp_bp'], params['param_dict']['cadd'] )
-    ret = subprocess.check_call( cmd, shell=True )
+    subprocess.check_call( cmd, shell=True )
     data_manager_dict = {
-                'data_tables':
-                    {'gemini_databases': [
-                            {'value': today.isoformat(), 'dbkey': 'hg19', 'name': 'GEMINI annotations (%s)' % today.isoformat(), 'path': './%s' % today.isoformat() }
-                                        ]
-                    }
-                }
+        'data_tables': {
+            'gemini_databases': [
+                {'value': today.isoformat(), 'dbkey': 'hg19', 'name': 'GEMINI annotations (%s)' % today.isoformat(), 'path': './%s' % today.isoformat() }
+            ]
+        }
+    }
 
-    #save info to json file
+    # save info to json file
     with open( sys.argv[1], 'wb' ) as out:
         out.write( json.dumps( data_manager_dict ) )
 
+
 if __name__ == "__main__":
     main()
-
--- a/data_manager/data_manager_gemini_download.xml	Thu Feb 18 08:49:06 2016 -0500
+++ b/data_manager/data_manager_gemini_download.xml	Tue Apr 04 18:09:05 2017 -0400
@@ -3,12 +3,8 @@
     <requirements>
         <requirement type="package" version="0.18.1">gemini</requirement>
     </requirements>
-    <stdio>
-        <exit_code range=":-1"  level="fatal" description="Error: Cannot open file" />
-        <exit_code range="1:"  level="fatal" description="Error" />
-    </stdio>
-    <command interpreter="python">
-        data_manager_gemini_download.py "$out_file"
+    <command detect_errors="exit_code">
+        python '$__tool_directory__/data_manager_gemini_download.py' '$out_file'
     </command>
     <inputs>
         <param name="cadd" type="boolean" truevalue="--extra cadd_score" falsevalue="" checked="True"
@@ -17,20 +13,17 @@
             label="Download GERP for GEMINI database annotation" help="(--extra gerp_bp)"/>
     </inputs>
     <outputs>
-           <data name="out_file" format="data_manager_json" label="${tool.name}"/>
+        <data name="out_file" format="data_manager_json" label="${tool.name}"/>
     </outputs>
     <tests>
     </tests>
     <help>
-
 This tool downloads the GEMINI databases.
 
 For details about this tool, please go to http://gemini.readthedocs.org
-
     </help>
     <citations>
         <citation type="doi">10.1371/journal.pcbi.1003153</citation>
-        <yield />
     </citations>
 </tool>
 
--- a/tool_data_table_conf.xml.sample	Thu Feb 18 08:49:06 2016 -0500
+++ b/tool_data_table_conf.xml.sample	Tue Apr 04 18:09:05 2017 -0400
@@ -1,5 +1,5 @@
 <tables>
-    <table name="gemini_databases" comment_char="#">
+    <table name="gemini_databases" comment_char="#" allow_duplicate_entries="False">
         <columns>value, dbkey, name, path</columns>
         <file path="tool-data/gemini_databases.loc" />
     </table>
--- a/tool_dependencies.xml	Thu Feb 18 08:49:06 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="gemini" version="0.18.1">
-        <repository changeset_revision="be869e11582f" name="package_gemini_0_18_1" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>