diff nucleotide_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 95a05c1ef5d5
children a631c2f6d913
line wrap: on
line diff
--- a/nucleotide_diversity_pi.xml	Mon Jun 03 12:29:29 2013 -0400
+++ b/nucleotide_diversity_pi.xml	Mon Jul 15 10:47:35 2013 -0400
@@ -2,11 +2,16 @@
   <description>: &amp;pi; and &amp;theta;</description>
 
   <command interpreter="python">
-    nucleotide_diversity_pi.py "$saps" "$snps" "$intervals" "$indivs" "$output"
-    #for $individual_name, $individual_col in zip($snps.dataset.metadata.individual_names, $snps.dataset.metadata.individual_columns)
-      #set $arg = '%s:%s' % ($individual_col, $individual_name)
-      "$arg"
-    #end for
+    #import json
+    #import base64
+    #import zlib
+    #set $ind_names = $snps.dataset.metadata.individual_names
+    #set $ind_colms = $snps.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)
+    nucleotide_diversity_pi.py '$saps' '$snps' '$intervals' '$indivs' '$output' '$ind_arg'
   </command>
 
   <inputs>