diff diversity_pi.xml @ 27:8997f2ca8c7a

Update to Miller Lab devshed revision bae0d3306d3b
author Richard Burhans <burhans@bx.psu.edu>
date Mon, 15 Jul 2013 10:47:35 -0400
parents 248b06e86022
children a631c2f6d913
line wrap: on
line diff
--- a/diversity_pi.xml	Mon Jun 03 12:29:29 2013 -0400
+++ b/diversity_pi.xml	Mon Jul 15 10:47:35 2013 -0400
@@ -2,11 +2,16 @@
   <description>&amp;pi;</description>
 
   <command interpreter="python">
-    diversity_pi.py "$input" "$coverage_input" "$indiv_input" "$min_coverage" "$output"
-    #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
-        #set $arg = '%s:%s' % ($individual_col, $individual)
-        "$arg"
-    #end for
+    #import json
+    #import base64
+    #import zlib
+    #set $ind_names = $input.dataset.metadata.individual_names
+    #set $ind_colms = $input.dataset.metadata.individual_columns
+    #set $ind_dict = dict(zip($ind_names, $ind_colms))
+    #set $ind_json = json.dumps($ind_dict, separators=(',',':'))
+    #set $ind_comp = zlib.compress($ind_json, 9)
+    #set $ind_arg = base64.b64encode($ind_comp)
+    diversity_pi.py '$input' '$coverage_input' '$indiv_input' '$min_coverage' '$output' '$ind_arg'
   </command>
 
   <inputs>