annotate vcf_phase.xml @ 2:54c84f7dcb2c draft

Uploaded
author jaredgk
date Wed, 17 Oct 2018 17:20:47 -0400
parents 15245deda141
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
1 <tool id="vcf_phase" name="Phase VCF" version="1.0.0.1">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
2
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
3 <description>files with BEAGLE or SHAPEIT</description>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
4
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
5 <requirements>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
6 <requirement type="package" >pandas</requirement>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
7 <requirement type="package" >pysam</requirement>
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
8 <requirement type="package" >beagle</requirement>
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
9 <requirement type="package" >shapeit</requirement>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
10 </requirements>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
11
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
12 <command><![CDATA[
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
13 #if $input.is_of_type('vcf_bgzip')
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
14 ln -fs $input input.vcf.gz &&
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
15 ln -fs $input.metadata.tabix_index input.vcf.gz.tbi &&
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
16 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
17 #if $input.is_of_type('vcf')
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
18 ln -fs $input input.vcf &&
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
19 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
20 python $__tool_directory__/vcf_phase.py
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
21 --phase-algorithm $phase.phase_algorithm
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
22 --out $output
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
23 --out-format $out_format
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
24
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
25 #if $input.is_of_type('vcf_bgzip')
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
26 --vcf input.vcf.gz
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
27 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
28
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
29 #if $input.is_of_type('vcf')
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
30 --vcf input.vcf
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
31 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
32
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
33 #if $model_file
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
34 --model-file $model_file
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
35 --model $model
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
36 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
37
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
38 #if $phase.phase_algorithm == 'beagle'
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
39 --beagle-path $__tool_data_path__/shared/jars/
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
40 #if $phase.beagle_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
41 --beagle-iter $phase.beagle_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
42 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
43 #if $phase.beagle_burn_iter
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
44 --beagle-burn-iter $phase.beagle_burn_iter
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
45 #end if
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
46 #if $phase.beagle_states
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
47 --beagle-states $phase.beagle_states
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
48 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
49 #if $phase.beagle_window
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
50 --beagle-window $phase.beagle_window
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
51 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
52 #if $phase.beagle_overlap
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
53 --beagle-overlap $phase.beagle_overlap
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
54 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
55 #if $phase.beagle_error
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
56 --beagle-error $phase.beagle_error
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
57 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
58 #if $phase.beagle_step
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
59 --beagle-step $phase.beagle_step
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
60 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
61 #if $phase.beagle_nsteps
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
62 --beagle-nsteps $phase.beagle_nsteps
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
63 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
64 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
65
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
66 #if $phase.phase_algorithm == 'shapeit'
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
67 #if $phase.shapeit_burn_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
68 --shapeit-burn-iter $phase.shapeit_burn_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
69 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
70 #if $phase.shapeit_prune_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
71 --shapeit-prune-iter $phase.shapeit_prune_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
72 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
73 #if $phase.shapeit_main_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
74 --shapeit-main-iter $phase.shapeit_main_iter
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
75 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
76 #if $phase.shapeit_states
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
77 --shapeit-states $phase.shapeit_states
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
78 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
79 #if $phase.shapeit_window
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
80 --shapeit-window $phase.shapeit_window
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
81 #end if
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
82 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
83
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
84 #if $common.genetic_map
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
85 --genetic-map $common.genetic_map
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
86 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
87
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
88 #if $common.ne
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
89 --Ne $common.ne
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
90 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
91
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
92 #if $common.random_seed
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
93 --random-seed $common.random_seed
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
94 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
95
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
96 #if $common.phase_chr
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
97 --phase-chr $common.phase_chr
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
98 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
99
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
100 #if $common.phase_from_bp
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
101 --phase-from-bp $common.phase_from_bp
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
102 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
103
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
104 #if $common.phase_to_bp
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
105 --phase-to-bp $common.phase_to_bp
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
106 #end if
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
107
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
108
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
109 ]]></command>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
110
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
111 <inputs>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
112
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
113 <param format="vcf,vcf_bgzip" name="input" type="data" label="VCF Input"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
114
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
115 <param format="model" name="model_file" type="data" label="Model Input" optional="True"/>
1
15245deda141 Uploaded
jaredgk
parents: 0
diff changeset
116 <param name="model" type="select" label="Select Model" refresh_on_change="True" optional="True">
0
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
117 <options>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
118 <filter type="data_meta" ref="model_file" key="models"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
119 </options>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
120 </param>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
121
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
122 <conditional name="phase">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
123 <param name="phase_algorithm" type="select" label="Phase Algorithm" refresh_on_change='True'>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
124 <option value="beagle" selected="True" >Beagle</option>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
125 <option value="shapeit">SHAPEIT</option>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
126 </param>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
127 <when value="beagle">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
128 <param name="beagle_burn_iter" type="integer" label="Burn-in iterations" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
129 <param name="beagle_iter" type="integer" label="Post burn-in iterations" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
130 <param name="beagle_states" type="integer" label="Model states for genotype estimation" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
131 <param name="beagle_window" type="float" label="Sliding window size (cM)" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
132 <param name="beagle_overlap" type="float" label="Overlap between neighboring sliding windows (cM)" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
133 <param name="beagle_error" type="float" label="HMM allele mismatch probability" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
134 <param name="beagle_step" type="float" label="Step length (cM)" optional="True" help="Used for identifying short IBS segments"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
135 <param name="beagle_nsteps" type="integer" label="Number of consecutive steps" optional="True" help="Used for identifying long IBS segments"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
136 </when>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
137 <when value="shapeit">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
138 <param name="shapeit_burn_iter" type="integer" label="Burn-in iterations" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
139 <param name="shapeit_prune_iter" type="integer" label="Pruning iterations" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
140 <param name="shapeit_main_iter" type="integer" label="Main iterations" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
141 <param name="shapeit_states" type="integer" label="Conditioning states for haplotype estimation" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
142 <param name="shapeit_window" type="float" label="Model window size (Mb)" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
143 </when>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
144 </conditional>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
145
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
146 <section name="common" title="Common Parameters" expanded="True">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
147 <param name="random_seed" type="integer" label="Seed value" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
148 <param format="text" name="genetic_map" type="data" label="Genetic Map" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
149 <param name="ne" type="integer" label="Effective population size" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
150 <param name="phase_chr" type="text" label="Chromosome to phase" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
151 <param name="phase_from_bp" type="integer" label="Lower bound of sites to include" help="Only usable with a single chromosome" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
152 <param name="phase_to_bp" type="integer" label="Upper bound of sites to include" help="Only usable with a single chromosome" optional="True"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
153 </section>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
154
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
155 <param name="out_format" type="select" label="Output Format">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
156 <option value="vcf">VCF File</option>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
157 <option value="vcf.gz" selected="True">bgzipped-VCF File</option>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
158 <option value="bcf">BCF File</option>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
159 </param>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
160
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
161 </inputs>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
162 <outputs>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
163
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
164 <data name="output" format="vcf_bgzip">
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
165 <change_format>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
166 <when input="out_format" value="vcf" format="vcf"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
167 <when input="out_format" value="bcf" format="bcf"/>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
168 </change_format>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
169 </data>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
170
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
171 </outputs>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
172
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
173 <help>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
174 VCF Phaser Help Text
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
175 </help>
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
176
3830d29fca6a Uploaded
jaredgk
parents:
diff changeset
177 </tool>