comparison 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
comparison
equal deleted inserted replaced
26:91e835060ad2 27:8997f2ca8c7a
1 <tool id="gd_phylogenetic_tree" name="Phylogenetic Tree" version="1.1.0"> 1 <tool id="gd_phylogenetic_tree" name="Phylogenetic Tree" version="1.1.0">
2 <description>: Show genetic relationships among individuals</description> 2 <description>: Show genetic relationships among individuals</description>
3 3
4 <command interpreter="python"> 4 <command interpreter="python">
5 phylogenetic_tree.py "$input" "$output" "$output.files_path" 5 #import json
6 6 #import base64
7 #import zlib
8 #set $ind_names = $input.dataset.metadata.individual_names
9 #set $ind_colms = $input.dataset.metadata.individual_columns
10 #set $ind_dict = dict(zip($ind_names, $ind_colms))
11 #set $ind_json = json.dumps($ind_dict, separators=(',',':'))
12 #set $ind_comp = zlib.compress($ind_json, 9)
13 #set $ind_arg = base64.b64encode($ind_comp)
14 phylogenetic_tree.py '$input' '$output' '$output.files_path'
7 #if $input_type.choice == '0' 15 #if $input_type.choice == '0'
8 "gd_snp" 16 'gd_snp'
9 #if $input_type.data_source.choice == '0' 17 #if $input_type.data_source.choice == '0'
10 "sequence_coverage" 18 'sequence_coverage'
11 "$input_type.data_source.minimum_coverage" 19 '$input_type.data_source.minimum_coverage'
12 "$input_type.data_source.minimum_quality" 20 '$input_type.data_source.minimum_quality'
13 #else if $input_type.data_source.choice == '1' 21 #else if $input_type.data_source.choice == '1'
14 "estimated_genotype" 22 'estimated_genotype' '0' '0'
15 #end if 23 #end if
16 #else if $input_type.choice == '1' 24 #else if $input_type.choice == '1'
17 "gd_genotype" 25 'gd_genotype' 'estimated_genotype' '0' '0'
18 #end if 26 #end if
19
20 #if $individuals.choice == '0' 27 #if $individuals.choice == '0'
21 "all_individuals" 28 'all_individuals'
22 #else if $individuals.choice == '1' 29 #else if $individuals.choice == '1'
23 "$individuals.p1_input" 30 '$individuals.p1_input'
24 #end if 31 #end if
25
26 #if ((str($input.metadata.scaffold) == str($input.metadata.ref)) and (str($input.metadata.pos) == str($input.metadata.rPos))) or (str($include_reference) == '0') 32 #if ((str($input.metadata.scaffold) == str($input.metadata.ref)) and (str($input.metadata.pos) == str($input.metadata.rPos))) or (str($include_reference) == '0')
27 "none" 33 'none'
28 #else 34 #else
29 "$input.metadata.dbkey" 35 '$input.metadata.dbkey'
30 #end if 36 #end if
31
32 #set $draw_tree_options = ''.join(str(x) for x in [$branch_style, $scale_style, $length_style, $layout_style]) 37 #set $draw_tree_options = ''.join(str(x) for x in [$branch_style, $scale_style, $length_style, $layout_style])
33 #if $draw_tree_options == '' 38 #if $draw_tree_options == ''
34 "" 39 ''
35 #else 40 #else
36 "-$draw_tree_options" 41 '-$draw_tree_options'
37 #end if 42 #end if
38 43 '$ind_arg'
39 #for $individual_name, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
40 #set $arg = '%s:%s' % ($individual_col, $individual_name)
41 "$arg"
42 #end for
43 </command> 44 </command>
44 45
45 <inputs> 46 <inputs>
46 <conditional name="input_type"> 47 <conditional name="input_type">
47 <param name="choice" type="select" format="integer" label="Input format"> 48 <param name="choice" type="select" format="integer" label="Input format">