comparison draw_variants.xml @ 31:a631c2f6d913

Update to Miller Lab devshed revision 3c4110ffacc3
author Richard Burhans <burhans@bx.psu.edu>
date Fri, 20 Sep 2013 13:25:27 -0400
parents 8997f2ca8c7a
children
comparison
equal deleted inserted replaced
30:4188853b940b 31:a631c2f6d913
1 <tool id="gd_draw_variants" name="Draw" version="1.0.0"> 1 <tool id="gd_draw_variants" name="Draw variants" version="1.1.0">
2 <description>variants</description> 2 <description>: show positions of SNVs and unsequenced intervals</description>
3 3
4 <command interpreter="python"> 4 <command interpreter="python">
5 #import json 5 #import json
6 #import base64 6 #import base64
7 #import zlib 7 #import zlib
8 #set $ind_names = $input.dataset.metadata.individual_names 8 #if $use_snp.choice == '1'
9 #set $ind_colms = $input.dataset.metadata.individual_columns 9 #set $snp_file = $use_snp.snp_input
10 #set $ind_dict = dict(zip($ind_names, $ind_colms)) 10 #set $snp_ext = $use_snp.snp_input.ext
11 #set $ind_json = json.dumps($ind_dict, separators=(',',':')) 11 #set $snp_names = $use_snp.snp_input.dataset.metadata.individual_names
12 #set $ind_comp = zlib.compress($ind_json, 9) 12 #set $snp_colms = $use_snp.snp_input.dataset.metadata.individual_columns
13 #set $ind_arg = base64.b64encode($ind_comp) 13 #set $snp_dict = dict(zip($snp_names, $snp_colms))
14 draw_variants.py '$input' '$indel_input' '$coverage_input' '$annotation_input' '$indiv_input' '$ref_name' '$min_coverage' '$output' '$ind_arg' 14 #set $snp_json = json.dumps($snp_dict, separators=(',',':'))
15 #set $snp_comp = zlib.compress($snp_json, 9)
16 #set $snp_arg = base64.b64encode($snp_comp)
17 #else
18 #set $snp_file = '/dev/null'
19 #set $snp_ext = ''
20 #set $snp_arg = ''
21 #end if
22 #if $use_cov.choice == '1'
23 #set $cov_file = $use_cov.cov_input
24 #set $cov_ext = $use_cov.cov_input.ext
25 #set $cov_names = $use_cov.cov_input.dataset.metadata.individual_names
26 #set $cov_colms = $use_cov.cov_input.dataset.metadata.individual_columns
27 #set $cov_dict = dict(zip($cov_names, $cov_colms))
28 #set $cov_json = json.dumps($cov_dict, separators=(',',':'))
29 #set $cov_comp = zlib.compress($cov_json, 9)
30 #set $cov_arg = base64.b64encode($cov_comp)
31 #set $cov_min = $use_cov.min_coverage
32 #else
33 #set $cov_file = '/dev/null'
34 #set $cov_ext = ''
35 #set $cov_arg = ''
36 #set $cov_min = 0
37 #end if
38 #if $use_indiv.choice == '1'
39 #set $ind_arg = $use_indiv.indiv_input
40 #else
41 #set $ind_arg = '/dev/null'
42 #end if
43 draw_variants.py '$snp_file' '$snp_ext' '$snp_arg' '$ind_arg' '$annotation_input' '$cov_file' '$cov_ext' '$cov_arg' '$cov_min' '$output'
15 </command> 44 </command>
16 45
17 <inputs> 46 <inputs>
18 <param name="input" type="data" format="gd_snp" label="SNP dataset" /> 47 <conditional name="use_snp">
19 <param name="indel_input" type="data" format="gd_snp" label="Indel dataset" /> 48 <param name="choice" type="select" format="integer" label="Include SNP/Genotype dataset">
20 <param name="coverage_input" type="data" format="interval" label="Coverage dataset" /> 49 <option value="1" selected="true">yes</option>
50 <option value="0">no</option>
51 </param>
52 <when value="0" />
53 <when value="1">
54 <param name="snp_input" type="data" format="gd_snp,gd_genotype" label="SNP/Genotype dataset" />
55 </when>
56 </conditional>
57 <conditional name="use_cov">
58 <param name="choice" type="select" format="integer" label="Include Coverage dataset">
59 <option value="1" selected="true">yes</option>
60 <option value="0">no</option>
61 </param>
62 <when value="0" />
63 <when value="1">
64 <param name="cov_input" type="data" format="gd_snp,gd_genotype" label="Coverage dataset" />
65 <param name="min_coverage" type="integer" min="1" value="1" label="Minimum coverage" />
66 </when>
67 </conditional>
68 <conditional name="use_indiv">
69 <param name="choice" type="select" label="Compute for">
70 <option value="0" selected="true">All individuals</option>
71 <option value="1">Individuals in a population</option>
72 </param>
73 <when value="0" />
74 <when value="1">
75 <param name="indiv_input" type="data" format="gd_indivs" label="Population Individuals" />
76 </when>
77 </conditional>
21 <param name="annotation_input" type="data" format="interval" label="Annotation dataset" /> 78 <param name="annotation_input" type="data" format="interval" label="Annotation dataset" />
22 <param name="indiv_input" type="data" format="gd_indivs" label="Population Individuals" />
23
24 <param name="ref_name" type="select" label="Ref name">
25 <options from_dataset="indiv_input">
26 <column name="name" index="1"/>
27 <column name="value" index="1"/>
28 <filter type="add_value" name="default" value="default" index="0" />
29 </options>
30 </param>
31
32 <param name="min_coverage" type="integer" min="1" value="1" label="Minimum coverage" />
33 </inputs> 79 </inputs>
34 80
35 <outputs> 81 <outputs>
36 <data name="output" format="svg" /> 82 <data name="output" format="tiff" />
37 </outputs> 83 </outputs>
38 84
85 <requirements>
86 <requirement type="package" version="0.1">gd_c_tools</requirement>
87 </requirements>
88
39 <help> 89 <help>
90 **What it does**
91
92 The user supplies the following:
93
94 1. A optional file in gd_genotype or gd_snp format giving the mitochondrial SNPs.
95 2. An optional gd_genotype file gives the sequence coverage for each individual at each mitochondrial position.
96 3. The minimum depth of sequence coverage. Positions where an individual has less coverage are ignoried.
97 4. A set of individuals specified with the "Specify individuals" tool.
98 5. A file of annotation for the reference mitochondrial sequence.
99
100 The program draws a picture indicating the locations of SNPs and the inadequately covered interval.
40 </help> 101 </help>
41 </tool> 102 </tool>