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