annotate vcf_phase.xml @ 0:3830d29fca6a draft

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