diff phylogenetic_tree.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/phylogenetic_tree.xml	Mon Jun 03 12:29:29 2013 -0400
+++ b/phylogenetic_tree.xml	Mon Jul 15 10:47:35 2013 -0400
@@ -2,44 +2,45 @@
   <description>: Show genetic relationships among individuals</description>
 
   <command interpreter="python">
-    phylogenetic_tree.py "$input" "$output" "$output.files_path"
-
+    #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)
+    phylogenetic_tree.py '$input' '$output' '$output.files_path'
     #if $input_type.choice == '0'
-      "gd_snp"
+      'gd_snp'
       #if $input_type.data_source.choice == '0'
-        "sequence_coverage"
-        "$input_type.data_source.minimum_coverage"
-        "$input_type.data_source.minimum_quality"
+        'sequence_coverage'
+        '$input_type.data_source.minimum_coverage'
+        '$input_type.data_source.minimum_quality'
       #else if $input_type.data_source.choice == '1'
-        "estimated_genotype"
+        'estimated_genotype' '0' '0'
       #end if
     #else if $input_type.choice == '1'
-      "gd_genotype"
-    #end if
-
-    #if $individuals.choice == '0'
-      "all_individuals"
-    #else if $individuals.choice == '1'
-      "$individuals.p1_input"
+      'gd_genotype' 'estimated_genotype' '0' '0'
     #end if
-
+    #if $individuals.choice == '0'
+      'all_individuals'
+    #else if $individuals.choice == '1'
+      '$individuals.p1_input'
+    #end if
 	#if ((str($input.metadata.scaffold) == str($input.metadata.ref)) and (str($input.metadata.pos) == str($input.metadata.rPos))) or (str($include_reference) == '0')
-        "none"
+        'none'
     #else
-        "$input.metadata.dbkey"
+        '$input.metadata.dbkey'
     #end if
-
     #set $draw_tree_options = ''.join(str(x) for x in [$branch_style, $scale_style, $length_style, $layout_style])
     #if $draw_tree_options == ''
-        ""
+        ''
     #else
-        "-$draw_tree_options"
+        '-$draw_tree_options'
     #end if
-
-    #for $individual_name, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
-        #set $arg = '%s:%s' % ($individual_col, $individual_name)
-        "$arg"
-    #end for
+    '$ind_arg'
   </command>
 
   <inputs>