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