comparison prepare_population_structure.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_prepare_population_structure" name="Prepare Input" version="1.1.0"> 1 <tool id="gd_prepare_population_structure" name="Prepare Input" version="1.2.0">
2 <description>: Filter and convert to the format needed for these tools</description> 2 <description>: Filter and convert to the format needed for these tools</description>
3 3
4 <command interpreter="python"> 4 <command interpreter="python">
5 prepare_population_structure.py "$input" 5 #import json
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 prepare_population_structure.py '$input'
6 #if $input_type.choice == '0' 15 #if $input_type.choice == '0'
7 "gd_snp" "$input_type.min_reads" "$input_type.min_qual" 16 'gd_snp' '$input_type.min_reads' '$input_type.min_qual'
8 #else if $input_type.choice == '1' 17 #else if $input_type.choice == '1'
9 "gd_genotype" "0" "0" 18 'gd_genotype' '0' '0'
10 #end if 19 #end if
11 "$min_spacing" "$output" "$output.files_path" 20 '0' '$output' '$output.files_path' '$ind_arg'
12 #if $individuals.choice == '0' 21 #if $individuals.choice == '0'
13 "all_individuals" 22 'all_individuals'
14 #else if $individuals.choice == '1' 23 #else if $individuals.choice == '1'
15 #for $population in $individuals.populations 24 #for $population in $individuals.populations
16 #set $pop_arg = 'population:%s:%s' % (str($population.p_input), str($population.p_input.name)) 25 #set $pop_arg = 'population:%s:%s' % (str($population.p_input), str($population.p_input.name))
17 "$pop_arg" 26 '$pop_arg'
18 #end for 27 #end for
19 #end if 28 #end if
20 #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
21 #set $arg = 'individual:%s:%s' % ($individual_col, $individual)
22 "$arg"
23 #end for
24 </command> 29 </command>
25 30
26 <inputs> 31 <inputs>
27 <conditional name="input_type"> 32 <conditional name="input_type">
28 <param name="choice" type="select" format="integer" label="Input format"> 33 <param name="choice" type="select" format="integer" label="Input format">
50 <param name="p_input" type="data" format="gd_indivs" label="Individuals" /> 55 <param name="p_input" type="data" format="gd_indivs" label="Individuals" />
51 </repeat> 56 </repeat>
52 </when> 57 </when>
53 </conditional> 58 </conditional>
54 59
60 <!--
55 <param name="min_spacing" type="integer" min="0" value="0" label="Minimum spacing between SNPs" /> 61 <param name="min_spacing" type="integer" min="0" value="0" label="Minimum spacing between SNPs" />
62 "$min_spacing" "$output" "$output.files_path"
63 -->
56 </inputs> 64 </inputs>
57 65
58 <outputs> 66 <outputs>
59 <data name="output" format="gd_ped"> 67 <data name="output" format="gd_ped">
60 <actions> 68 <actions>