comparison king.xml @ 1:1932808c6fab draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/king/ commit 1c50106137c5b3260f18864ac9084056fa91ec80"
author iuc
date Mon, 18 Apr 2022 18:04:56 +0000
parents ec2bc87ebd7b
children
comparison
equal deleted inserted replaced
0:ec2bc87ebd7b 1:1932808c6fab
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <tool id="king" name="KING" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> 2 <tool id="king" name="KING" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
3 <description>Kinship-based INference for GWAS</description> 3 <description>Kinship-based INference for GWAS</description>
4 <macros> 4 <macros>
5 <token name="@TOOL_VERSION@">2.2.4</token> 5 <token name="@TOOL_VERSION@">2.2.7</token>
6 <token name="@VERSION_SUFFIX@">0</token> 6 <token name="@VERSION_SUFFIX@">0</token>
7 </macros> 7 </macros>
8 <requirements> 8 <requirements>
9 <requirement type="package" version="@TOOL_VERSION@">king</requirement> 9 <requirement type="package" version="@TOOL_VERSION@">king</requirement>
10 <requirement type="package" version="1.6.4">r-kinship2</requirement> 10 <requirement type="package" version="1.8.5">r-kinship2</requirement>
11 <requirement type="package" version="1.2.2">r-igraph</requirement> 11 <requirement type="package" version="1.3.0">r-igraph</requirement>
12 <requirement type="package" version="1.7_9">r-e1071</requirement>
12 </requirements> 13 </requirements>
13 <version_command> 14 <version_command>
14 king | head -1 | cut -d' ' -f 2 15 king | head -1 | cut -d' ' -f 2
15 </version_command> 16 </version_command>
16 <command detect_errors="exit_code"><![CDATA[ 17 <command detect_errors="exit_code"><![CDATA[
17 ln -s '$genotype' input.bed && 18 ln -s '$genotype' input.bed &&
18 ln -s '$family' input.fam &&
19 ln -s '$map' input.bim &&
20 19
21 king -b input.bed --fam input.fam --bim input.bim 20 #if $opt_int.family:
22 $related 21 ln -s '$opt_int.family' input.fam &&
23 $duplicate 22 #end if
24 $kinship 23 #if $opt_int.map:
25 $ibdseg 24 ln -s '$opt_int.map' input.bim &&
26 $ibs 25 #end if
27 $homog 26 #if $gen_rsk.model:
28 #if str($degree): 27 ln -s '$gen_rsk.model' input.model &&
29 --degree $degree 28 #end if
30 #end if 29 ## General Input
31 #if str($projection): 30 king -b input.bed
32 --projection $projection 31 ## Close Relative Inference
33 #end if 32 $close_rel_i.related
34 $unrelated 33 $close_rel_i.duplicate
35 $build 34 ## Pairwise Relatedness Inference
36 $cluster 35 $pair_rel_i.kinship
37 $rplot 36 $pair_rel_i.ibdseg
38 37 $pair_rel_i.ibs
38 $pair_rel_i.homog
39 ## Inference Parameter
40 #if str($inf_param.degree):
41 --degree $inf_param.degree
42 #end if
43 #if str($inf_param.seglength):
44 --seglength $inf_param.seglength
45 #end if
46 ## Relationship Application
47 $rel_app.unrelated
48 $rel_app.cluster
49 $rel_app.build
50 ## QC Report
51 #if str($qc_rep.callrateN):
52 --callrateN $callrateN
53 #end if
54 #if str($qc_rep.callrateM):
55 --callrateM $callrateM
56 #end if
57 ## Population Structure
58 $pop_str.pca
59 $pop_str.mds
60 ## Structure Parameter
61 #if str($str_par.pcs)
62 --pcs $str_par.pcs
63 #end if
64 #if str($str_par.projection)
65 --projection $str_par.projection
66 #end if
67 ## Disease Assosciation
68 $dis_ass.tdt
69 ## Quantitiative Trait Association
70 $qnt_trt.mtscore
71 ## Association Model
72 #if str($ass_mod.trait)
73 --trait $ass_mod.trait
74 #end if
75 #if str($ass_mod.covariate)
76 --covariate $ass_mod.covariate
77 #end if
78 ## Association parameter
79 $ass_par.invnorm
80 #if str($ass_par.maxP)
81 --maxP $ass_par.maxP
82 #end if
83 ## Genetic Risk Score
84 $gen_rsk.risk
85 #if $gen_rsk.model:
86 --model input.model
87 #end if
88 #if str($gen_rsk.prevalence)
89 --prevalence $gen_rsk.prevalence
90 #end if
91 $gen_rsk.noflip
92 ## Computing parameter
93 --cpus "\${GALAXY_SLOTS:-4}"
94 ## Optional Input
95 #if $opt_int.family
96 --fam input.fam
97 #end if
98 #if $opt_int.map
99 --bim input.bim
100 #end if
101 #if $opt_int.sexchr
102 --sexchr $opt_int.sexchr
103 #end if
104 ## Output
105 $opt_par.rplot
106 $opt_par.pngplot
107 $opt_par.plink
39 > '$kingoutlog' 108 > '$kingoutlog'
40 ]]></command> 109 ]]></command>
41 <inputs> 110 <inputs>
42 <param name="genotype" type="data" format="pbed,binary" label="Binary Genotype File" /> 111 <param name="genotype" type="data" format="pbed" label="Binary Genotype File" help="Generated by PLINK" />
43 <param name="family" type="data" format="lped,txt" label="Family File" />
44 <param name="map" type="data" format="tabular" label="Map File" />
45 <!-- Beginning of the optional paramters --> 112 <!-- Beginning of the optional paramters -->
46 <param argument="--related" type="boolean" truevalue="--related" falsevalue="" label="Relationship Inference" help="Implements the fastest and integrated relationship inference." /> 113 <section name="close_rel_i" title="Close Relative Inference" >
47 <param argument="--duplicate" type="boolean" truevalue="--duplicate" falsevalue="" label="Duplicate Analysis" help="Implements the fastest (and accurate) algorithm to identify duplicates or MZ twins" /> 114 <param argument="--related" type="boolean" truevalue="--related" falsevalue=""
48 <param argument="--kinship" type="boolean" truevalue="--kinship" falsevalue="" label="Kinship Inference" help="Estimates pair-wise kinship coefficients" /> 115 label="Relationship Inference"
49 <param argument="--ibdseg" type="boolean" truevalue="--ibdseg" falsevalue="" label="IBD Segment Analysis" help="IBD segment analysis determines all IBD (IBD1 and IBD2) segments shared between relatives" /> 116 help="Implements the fastest and integrated relationship inference." />
50 <param argument="--ibs" type="boolean" truevalue="--ibs" falsevalue="" label="IBS Summary Statistics" help="Counts and average of IBS" /> 117 <param argument="--duplicate" type="boolean" truevalue="--duplicate" falsevalue=""
51 <param argument="--homog" type="boolean" truevalue="--homog" falsevalue="" label="Homogeneous Population" help="Estimates pair-wise kinship coefficients assuming a homogeneous population." /> 118 label="Duplicate Analysis"
52 <param argument="--degree" type="integer" min="0" optional="true" label="Degrees of relatedness" help="Filters relative pairs based on kinship coefficients." /> 119 help="Implements the fastest (and accurate) algorithm to identify duplicates or MZ twins" />
53 <param argument="--projection" type="integer" min="0" optional="true" label="Projection N" help="Includes the first N samples of a subset." /> 120 </section>
54 <param argument="--unrelated" type="boolean" truevalue="--unrelated" falsevalue="" label="Unrelated Option" help="Extract a list of unrelated individuals." /> 121 <!-- Despite many of the below parameters being grouped together, they can all
55 <param argument="--build" type="boolean" truevalue="--build" falsevalue="" label="Reconstruct Pedigree" help="Reconstructs pedigrees using SNP data" /> 122 surprisingly be used independently of one another, i.e. no mutual exclusivity that I can see -->
56 <param argument="--cluster" type="boolean" truevalue="--cluster" falsevalue="" label="Cluster Parameter" help="Clusters relatives into families by generating an updateid file." /> 123 <section name="pair_rel_i" title="Pairwise Relative Inference" >
57 <param argument="--rplot" type="boolean" truevalue="--rplot" falsevalue="" label="R Code and Plots" help="Generates R code first and then calls R program to make plots in a PDF file." /> 124 <param argument="--kinship" type="boolean" truevalue="--kinship" falsevalue=""
58 <param name="use_log" type="boolean" checked="false" label="Output a Log?" /> 125 label="Kinship Inference"
126 help="Estimates pair-wise kinship coefficients" />
127 <param argument="--ibdseg" type="boolean" truevalue="--ibdseg" falsevalue=""
128 label="IBD Segment Analysis"
129 help="IBD segment analysis determines all IBD (IBD1 and IBD2) segments shared between relatives" />
130 <param argument="--ibs" type="boolean" truevalue="--ibs" falsevalue=""
131 label="IBS Summary Statistics"
132 help="Counts and average of IBS" />
133 <param argument="--homog" type="boolean" truevalue="--homog" falsevalue=""
134 label="Homogeneous Population"
135 help="Estimates pair-wise kinship coefficients assuming a homogeneous population." />
136 </section>
137 <section name="inf_param" title="Inference Parameter" >
138 <param argument="--degree" type="integer" min="0" optional="true"
139 label="Degrees of relatedness"
140 help="Filters relative pairs based on kinship coefficients." />
141 <param argument="--seglength" type="integer" min="1" optional="true"
142 label="Minimum IBD segments"
143 help="specifies the minimum length of IDB segments that are considered towards the relationship inference" />
144 </section>
145 <section name="rel_app" title="Relationship Application" >
146 <param argument="--unrelated" type="boolean" truevalue="--unrelated" falsevalue=""
147 label="Unrelated Option"
148 help="Extract a list of unrelated individuals." />
149 <param argument="--cluster" type="boolean" truevalue="--cluster" falsevalue=""
150 label="Cluster Parameter"
151 help="Clusters relatives into families by generating an updateid file." />
152 <param argument="--build" type="boolean" truevalue="--build" falsevalue=""
153 label="Reconstruct Pedigree"
154 help="Reconstructs pedigrees using SNP data" />
155 </section>
156 <section name="qc_rep" title="QC Report" >
157 <param argument="--callrateN" type="integer" min="1" optional="true"
158 label="Set the N callrate" />
159 <param argument="--callrateM" type="integer" min="1" optional="true"
160 label="Set the M callrate" />
161 </section>
162 <section name="pop_str" title="Population Structure" >
163 <param argument="--pca" type="boolean" truevalue="--pca" falsevalue=""
164 label="Add PCA as dimension reduction algorithm" />
165 <param argument="--mds" type="boolean" truevalue="--mds" falsevalue=""
166 label="Add MDS as dimension reduction algorithm" />
167 </section>
168 <section name="str_par" title="Structure Parameter" >
169 <!-- Ye, all options can be selected here, apparently... -->
170 <param argument="--pcs" type="integer" min="1" optional="true"
171 label="Number of Principal Components to use"
172 help="allow the specification of the number of PCs with a default value of 10." />
173 <param argument="--projection" type="integer" min="0" optional="true"
174 label="Projection N"
175 help="Includes the first N samples of a subset." />
176 </section>
177 <section name="dis_ass" title="Disease Association" >
178 <param argument="--tdt" type="boolean" truevalue="--tdt" falsevalue=""
179 label="Transmission/Disequilibrium Test"
180 help="implements the well-known Transmission/Disequilibrium Test for family data that consist of parent-affected child trios." />
181 </section>
182 <section name="qnt_trt" title="Quantitative Trait Association" >
183 <param argument="--mtscore" type="boolean" truevalue="--mtscore" falsevalue=""
184 label="Score Test between SNP and quantitative trait"
185 help="Only association results with P value less than 5E-8 are printed out, including both cis- and trans- effect associations. "/>
186 </section>
187 <section name="ass_mod" title="Association Model" >
188 <param argument="--trait" type="text" optional="true"
189 label="Trait names"
190 help="Specifies the trait names to be analyzed in the association analysis." />
191 <param argument="--covariate" type="text" optional="true"
192 label="Covariate names"
193 help="Specifies the covariate names to be adjusted in the association analysis" />
194 </section>
195 <section name="ass_par" title="Association Parameter" >
196 <param argument="--invnorm" type="boolean" truevalue="--invnorm" falsevalue=""
197 label="Normal Transformation"
198 help="Carries out inverse normal transformation for quantitative traits prior to association analysis."/>
199 <param argument="--maxP" type="float" min="0" optional="true"
200 label="maximum P values"
201 help="specifies the maximum P values to print out in the output files."/>
202 </section>
203 <section name="gen_rsk" title="Genetic Risk Score" >
204 <param argument="--risk" type="boolean" truevalue="--risk" falsevalue=""
205 label="Predict Disease Risk"
206 help="predicts disease risks for each individual according to the GRS risk model" />
207 <param name="model" type="data" format="txt,tabular" label="GRS Risk Model file" optional="true" />
208 <param argument="--prevalence" type="float" min="0" optional="true"
209 label="Disease prevalence" />
210 <param argument="--noflip" type="boolean" truevalue="--noflip" falsevalue=""
211 label="No Flip"
212 help="If strands of genotype data are already consistent with model, enable this." />
213 </section>
214 <section name="opt_int" title="Optional Input" >
215 <param name="family" type="data" format="lped,txt" label="Family File" optional="true" />
216 <param name="map" type="data" format="tabular" label="Map File" optional="true" />
217 <param argument="--sexchr" type="integer" min="0" optional="true"
218 label="Pair number of the Sex Chromosome."
219 help="specifies the pair number of the sex chromosome, which should be userful for non-human species. The default sex chromosome is 23." />
220 </section>
221 <section name="opt_par" title="Optional Parameter" >
222 <param argument="--rplot" type="boolean" truevalue="--rplot" falsevalue=""
223 label="R Code and Plots"
224 help="Generates R code first and then calls R program to make plots in a PDF file." />
225 <param argument="--pngplot" type="boolean" truevalue="--pngplot" falsevalue=""
226 label="R Code and Plots in PNG format"
227 help="Generates R code first and then calls R program to make plots in a PNG file for certain applications." />
228 <param argument="--plink" type="boolean" truevalue="--plink" falsevalue=""
229 label="Output data in PLINK format" />
230 </section>
231 <param name="use_log" type="boolean" checked="false"
232 label="Output a Log?" />
59 </inputs> 233 </inputs>
60 <outputs> 234 <outputs>
61 <data name="kingoutlog" format="txt" label="${tool.name} on ${on_string} : Log" > 235 <data name="kingoutlog" format="txt" label="${tool.name} on ${on_string} : Log" >
62 <filter>use_log == True</filter> 236 <filter>use_log == True</filter>
63 </data> 237 </data>
64 <collection name="kingoutput_txt" type="list" label="${tool.name} on ${on_string}: Metrics"> 238 <collection name="kingoutput_txt" type="list" label="${tool.name} on ${on_string}: Metrics">
65 <discover_datasets pattern="king(?P&lt;designation&gt;.+)\.txt" format="txt" /> 239 <discover_datasets pattern="king(?P&lt;name&gt;.+)\.txt" format="txt" />
240 <discover_datasets pattern="king\.(?P&lt;name&gt;.+)" format="txt" />
241 <discover_datasets pattern="king_(?P&lt;name&gt;.+)\.plink" format="plink" />
242 <discover_datasets pattern="king_(?P&lt;name&gt;.+)\.R" format="txt" />
66 </collection> 243 </collection>
67 <collection name="kingoutput_log" type="list" label="${tool.name} on ${on_string}: Metrics Logs" > 244 <collection name="kingoutput_log" type="list" label="${tool.name} on ${on_string}: Metrics Logs" >
68 <filter>use_log == True</filter> 245 <filter>use_log == True</filter>
69 <discover_datasets pattern="king(?P&lt;designation&gt;.+)\.log" format="txt" /> 246 <discover_datasets pattern="king(?P&lt;name&gt;.+)\.log" format="txt" />
247 <discover_datasets pattern="king_(?P&lt;name&gt;.+)\.Rout" format="txt" />
70 </collection> 248 </collection>
71 <collection name="kingoutput_pdf" type="list" label="${tool.name} on ${on_string}: Plots"> 249 <collection name="kingoutput_pdf" type="list" label="${tool.name} on ${on_string}: Plots">
72 <discover_datasets pattern="king_(?P&lt;designation&gt;.+)\.pdf" format="pdf" /> 250 <filter>opt_par["rplot"] or opt_par["pngplot"]</filter>
251 <discover_datasets pattern="king_(?P&lt;name&gt;.+)\.pdf" format="pdf" />
252 <discover_datasets pattern="king_(?P&lt;name&gt;.+)\.png" format="png" />
73 </collection> 253 </collection>
74 </outputs> 254 </outputs>
75 <tests> 255 <tests>
76 <test> 256 <test expect_num_outputs="3">
77 <param name="genotype" value="new.6000.bed"/> 257 <param name="genotype" value="new.6000.bed"/>
78 <param name="family" value="new.6000.fam"/> 258 <section name="opt_int" >
79 <param name="map" value="new.6000.bim"/> 259 <param name="family" value="new.6000.fam"/>
80 <param name="related" value="true" /> 260 <param name="map" value="new.6000.bim"/>
261 </section>
262 <section name="close_rel_i" >
263 <param name="related" value="true" />
264 </section>
81 <param name="use_log" value="true" /> 265 <param name="use_log" value="true" />
82 <output name="kingoutlog"> 266 <output name="kingoutlog">
83 <assert_contents> 267 <assert_contents>
84 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is"/> 268 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is"/>
85 <has_text text="Information of these chromosomal segments can be found in file kingallsegs.txt" /> 269 <has_text text="Information of these chromosomal segments can be found in file kingallsegs.txt" />
86 <has_text text="--related" /> 270 <has_text text="--related" />
87 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" /> 271 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" />
88 </assert_contents> 272 </assert_contents>
89 </output> 273 </output>
90 </test> 274 </test>
91 <test> 275 <test expect_num_outputs="3">
92 <param name="genotype" value="new.6000.bed"/> 276 <param name="genotype" value="new.6000.bed"/>
93 <param name="family" value="new.6000.fam"/> 277 <section name="opt_int" >
94 <param name="map" value="new.6000.bim"/> 278 <param name="family" value="new.6000.fam"/>
95 <param name="related" value="true" /> 279 <param name="map" value="new.6000.bim"/>
96 <param name="degree" value="2" /> 280 </section>
281 <section name="close_rel_i" >
282 <param name="related" value="true" />
283 </section>
284 <section name="inf_param" >
285 <param name="degree" value="2" />
286 </section>
97 <param name="use_log" value="true" /> 287 <param name="use_log" value="true" />
98 <output name="kingoutlog"> 288 <output name="kingoutlog">
99 <assert_contents> 289 <assert_contents>
100 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is"/> 290 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is"/>
101 <has_text text="Information of these chromosomal segments can be found in file kingallsegs.txt" /> 291 <has_text text="Information of these chromosomal segments can be found in file kingallsegs.txt" />
103 <has_text text="--degree 2" /> 293 <has_text text="--degree 2" />
104 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" /> 294 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" />
105 </assert_contents> 295 </assert_contents>
106 </output> 296 </output>
107 </test> 297 </test>
108 <test> 298 <test expect_num_outputs="4">
109 <param name="genotype" value="new.6000.bed"/> 299 <param name="genotype" value="new.6000.bed"/>
110 <param name="family" value="new.6000.fam"/> 300 <section name="opt_int" >
111 <param name="map" value="new.6000.bim"/> 301 <param name="family" value="new.6000.fam"/>
112 <param name="related" value="true" /> 302 <param name="map" value="new.6000.bim"/>
113 <param name="degree" value="2" /> 303 </section>
114 <param name="rplot" value="true" /> 304 <section name="close_rel_i" >
305 <param name="related" value="true" />
306 </section>
307 <section name="inf_param" >
308 <param name="degree" value="2" />
309 </section>
310 <section name="opt_par" >
311 <param name="rplot" value="true" />
312 </section>
115 <param name="use_log" value="true" /> 313 <param name="use_log" value="true" />
116 <output name="kingoutlog"> 314 <output name="kingoutlog">
117 <assert_contents> 315 <assert_contents>
118 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/> 316 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/>
119 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" /> 317 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" />
123 <has_text text="(with 6000 SNPs): 8 pairs of relatives are detected (with kinship > 0.0625)" /> 321 <has_text text="(with 6000 SNPs): 8 pairs of relatives are detected (with kinship > 0.0625)" />
124 <has_text text="Relationship summary (total relatives: 0 by pedigree, 6 by inference)" /> 322 <has_text text="Relationship summary (total relatives: 0 by pedigree, 6 by inference)" />
125 </assert_contents> 323 </assert_contents>
126 </output> 324 </output>
127 </test> 325 </test>
128 <test> 326 <test expect_num_outputs="3">
129 <param name="genotype" value="new.6000.bed"/> 327 <param name="genotype" value="new.6000.bed"/>
130 <param name="family" value="new.6000.fam"/> 328 <section name="opt_int" >
131 <param name="map" value="new.6000.bim"/> 329 <param name="family" value="new.6000.fam"/>
132 <param name="duplicate" value="true" /> 330 <param name="map" value="new.6000.bim"/>
331 </section>
332 <section name="close_rel_i" >
333 <param name="duplicate" value="true" />
334 </section>
133 <param name="use_log" value="true" /> 335 <param name="use_log" value="true" />
134 <output name="kingoutlog"> 336 <output name="kingoutlog">
135 <assert_contents> 337 <assert_contents>
136 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/> 338 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/>
137 <has_text text="--duplicate" /> 339 <has_text text="--duplicate" />
138 <has_text text="No duplicates are found with heterozygote concordance rate > 80%." /> 340 <has_text text="No duplicates are found with heterozygote concordance rate > 80%." />
139 </assert_contents> 341 </assert_contents>
140 </output> 342 </output>
141 </test> 343 </test>
142 <test> 344 <test expect_num_outputs="3">
143 <param name="genotype" value="new.6000.bed"/> 345 <param name="genotype" value="new.6000.bed"/>
144 <param name="family" value="new.6000.fam"/> 346 <section name="opt_int" >
145 <param name="map" value="new.6000.bim"/> 347 <param name="family" value="new.6000.fam"/>
146 <param name="kinship" value="true" /> 348 <param name="map" value="new.6000.bim"/>
349 </section>
350 <section name="pair_rel_i" >
351 <param name="kinship" value="true" />
352 </section>
147 <param name="use_log" value="true" /> 353 <param name="use_log" value="true" />
148 <output name="kingoutlog"> 354 <output name="kingoutlog">
149 <assert_contents> 355 <assert_contents>
150 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/> 356 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/>
151 <has_text text="--kinship" /> 357 <has_text text="--kinship" />
152 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" /> 358 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" />
153 </assert_contents> 359 </assert_contents>
154 </output> 360 </output>
155 </test> 361 </test>
156 <test> 362 <test expect_num_outputs="3">
157 <param name="genotype" value="new.6000.bed"/> 363 <param name="genotype" value="new.6000.bed"/>
158 <param name="family" value="new.6000.fam"/> 364 <section name="opt_int" >
159 <param name="map" value="new.6000.bim"/> 365 <param name="family" value="new.6000.fam"/>
160 <param name="related" value="true" /> 366 <param name="map" value="new.6000.bim"/>
161 <param name="projection" value="100000" /> 367 </section>
368 <section name="close_rel_i" >
369 <param name="related" value="true" />
370 </section>
371 <section name="str_par" >
372 <param name="projection" value="100000" />
373 </section>
162 <param name="use_log" value="true" /> 374 <param name="use_log" value="true" />
163 <output name="kingoutlog"> 375 <output name="kingoutlog">
164 <assert_contents> 376 <assert_contents>
165 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/> 377 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals."/>
166 <has_text text="--related" /> 378 <has_text text="--related" />
169 <has_text text="PLINK maps loaded: 6000 SNPs" /> 381 <has_text text="PLINK maps loaded: 6000 SNPs" />
170 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." /> 382 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." />
171 </assert_contents> 383 </assert_contents>
172 </output> 384 </output>
173 </test> 385 </test>
174 <test> 386 <test expect_num_outputs="3">
175 <param name="genotype" value="new.6000.bed"/> 387 <param name="genotype" value="new.6000.bed"/>
176 <param name="family" value="new.6000.fam"/> 388 <section name="opt_int" >
177 <param name="map" value="new.6000.bim"/> 389 <param name="family" value="new.6000.fam"/>
178 <param name="ibdseg" value="true" /> 390 <param name="map" value="new.6000.bim"/>
391 </section>
392 <section name="pair_rel_i" >
393 <param name="ibdseg" value="true" />
394 </section>
179 <param name="use_log" value="true" /> 395 <param name="use_log" value="true" />
180 <output name="kingoutlog"> 396 <output name="kingoutlog">
181 <assert_contents> 397 <assert_contents>
182 <has_text text="--ibdseg" /> 398 <has_text text="--ibdseg" />
183 <has_text text="Sample pairs without any long IBD segments (>10Mb) are excluded." /> 399 <has_text text="Sample pairs without any long IBD segments (>10Mb) are excluded." />
184 <has_text text="IBD segments saved in a gzipped file king.segments.gz" /> 400 <has_text text="IBD segments saved in a gzipped file king.segments.gz" />
185 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" /> 401 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" />
186 </assert_contents> 402 </assert_contents>
187 </output> 403 </output>
188 </test> 404 </test>
189 <test> 405 <test expect_num_outputs="4">
190 <param name="genotype" value="new.6000.bed"/> 406 <param name="genotype" value="new.6000.bed"/>
191 <param name="family" value="new.6000.fam"/> 407 <section name="opt_int" >
192 <param name="map" value="new.6000.bim"/> 408 <param name="family" value="new.6000.fam"/>
193 <param name="ibdseg" value="true" /> 409 <param name="map" value="new.6000.bim"/>
194 <param name="degree" value="3" /> 410 </section>
195 <param name="rplot" value="true" /> 411 <section name="pair_rel_i" >
412 <param name="ibdseg" value="true" />
413 </section>
414 <section name="inf_param" >
415 <param name="degree" value="3" />
416 </section>
417 <section name="opt_par" >
418 <param name="rplot" value="true" />
419 </section>
196 <param name="use_log" value="true" /> 420 <param name="use_log" value="true" />
197 <output name="kingoutlog"> 421 <output name="kingoutlog">
198 <assert_contents> 422 <assert_contents>
199 <has_text text="--ibdseg" /> 423 <has_text text="--ibdseg" />
200 <has_text text="--rplot" /> 424 <has_text text="--rplot" />
202 <has_text text="Summary statistics of IBD segments for individual pairs saved in file king.seg" /> 426 <has_text text="Summary statistics of IBD segments for individual pairs saved in file king.seg" />
203 <has_text text="Genotype data consist of 6000 autosome SNPs" /> 427 <has_text text="Genotype data consist of 6000 autosome SNPs" />
204 </assert_contents> 428 </assert_contents>
205 </output> 429 </output>
206 </test> 430 </test>
207 <test> 431 <test expect_num_outputs="3">
208 <param name="genotype" value="new.6000.bed"/> 432 <param name="genotype" value="new.6000.bed"/>
209 <param name="family" value="new.6000.fam"/> 433 <section name="opt_int" >
210 <param name="map" value="new.6000.bim"/> 434 <param name="family" value="new.6000.fam"/>
211 <param name="ibs" value="true" /> 435 <param name="map" value="new.6000.bim"/>
436 </section>
437 <section name="pair_rel_i" >
438 <param name="ibs" value="true" />
439 </section>
212 <param name="use_log" value="true" /> 440 <param name="use_log" value="true" />
213 <output name="kingoutlog"> 441 <output name="kingoutlog">
214 <assert_contents> 442 <assert_contents>
215 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." /> 443 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." />
216 <has_text text="Within-family IBS data saved in file king.ibs" /> 444 <has_text text="Within-family IBS data saved in file king.ibs" />
220 <has_text text="Between-family IBS data saved in file king.ibs0" /> 448 <has_text text="Between-family IBS data saved in file king.ibs0" />
221 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" /> 449 <has_text text="Relationship summary (total relatives: 200 by pedigree, 200 by inference)" />
222 </assert_contents> 450 </assert_contents>
223 </output> 451 </output>
224 </test> 452 </test>
225 <test> 453 <test expect_num_outputs="3">
226 <param name="genotype" value="new.6000.bed"/> 454 <param name="genotype" value="new.6000.bed"/>
227 <param name="family" value="new.6000.fam"/> 455 <section name="opt_int" >
228 <param name="map" value="new.6000.bim"/> 456 <param name="family" value="new.6000.fam"/>
229 <param name="homog" value="true" /> 457 <param name="map" value="new.6000.bim"/>
458 </section>
459 <section name="pair_rel_i" >
460 <param name="homog" value="true" />
461 </section>
230 <param name="use_log" value="true" /> 462 <param name="use_log" value="true" />
231 <output name="kingoutlog"> 463 <output name="kingoutlog">
232 <assert_contents> 464 <assert_contents>
233 <has_text text="Autosome genotypes stored in 375 words for each of 332 individuals." /> 465 <has_text text="Autosome genotypes stored in 375 words for each of 332 individuals." />
234 <has_text text="--homo" /> 466 <has_text text="--homo" />
235 <has_text text="Within-family kinship data saved in file king.kin" /> 467 <has_text text="Within-family kinship data saved in file king.kin" />
236 <has_text text="Genotype data consist of 6000 autosome SNPs" /> 468 <has_text text="Genotype data consist of 6000 autosome SNPs" />
237 </assert_contents> 469 </assert_contents>
238 </output> 470 </output>
239 </test> 471 </test>
240 <test> 472 <test expect_num_outputs="3">
241 <param name="genotype" value="new.6000.bed"/> 473 <param name="genotype" value="new.6000.bed"/>
242 <param name="family" value="new.6000.fam"/> 474 <section name="opt_int" >
243 <param name="map" value="new.6000.bim"/> 475 <param name="family" value="new.6000.fam"/>
244 <param name="unrelated" value="true" /> 476 <param name="map" value="new.6000.bim"/>
477 </section>
478 <section name="rel_app" >
479 <param name="unrelated" value="true" />
480 </section>
245 <param name="use_log" value="true" /> 481 <param name="use_log" value="true" />
246 <output name="kingoutlog"> 482 <output name="kingoutlog">
247 <assert_contents> 483 <assert_contents>
248 <has_text text="--unrelated" /> 484 <has_text text="--unrelated" />
249 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" /> 485 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" />
250 <has_text text="Y028,Y117" /> 486 <has_text text="Y028,Y117" />
251 <has_text text="An alternative list of 114 to-be-removed individuals saved in file kingunrelated_toberemoved.txt" /> 487 <has_text text="An alternative list of 114 to-be-removed individuals saved in file kingunrelated_toberemoved.txt" />
252 </assert_contents> 488 </assert_contents>
253 </output> 489 </output>
254 </test> 490 </test>
255 <test> 491 <test expect_num_outputs="3">
256 <param name="genotype" value="new.6000.bed"/> 492 <param name="genotype" value="new.6000.bed"/>
257 <param name="family" value="new.6000.fam"/> 493 <section name="opt_int" >
258 <param name="map" value="new.6000.bim"/> 494 <param name="family" value="new.6000.fam"/>
259 <param name="unrelated" value="true" /> 495 <param name="map" value="new.6000.bim"/>
260 <param name="degree" value="2" /> 496 </section>
497 <section name="rel_app" >
498 <param name="unrelated" value="true" />
499 </section>
500 <section name="inf_param" >
501 <param name="degree" value="2" />
502 </section>
261 <param name="use_log" value="true" /> 503 <param name="use_log" value="true" />
262 <output name="kingoutlog" > 504 <output name="kingoutlog" >
263 <assert_contents> 505 <assert_contents>
264 <has_text text="--unrelated" /> 506 <has_text text="--unrelated" />
265 <has_text text="--degree 2" /> 507 <has_text text="--degree 2" />
266 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." /> 508 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." />
267 <has_text text="An alternative list of 114 to-be-removed individuals saved in file kingunrelated_toberemoved.txt" /> 509 <has_text text="An alternative list of 114 to-be-removed individuals saved in file kingunrelated_toberemoved.txt" />
268 </assert_contents> 510 </assert_contents>
269 </output> 511 </output>
270 </test> 512 </test>
271 <test> 513 <test expect_num_outputs="3">
272 <param name="genotype" value="new.6000.bed"/> 514 <param name="genotype" value="new.6000.bed"/>
273 <param name="family" value="new.6000.fam"/> 515 <section name="opt_int" >
274 <param name="map" value="new.6000.bim"/> 516 <param name="family" value="new.6000.fam"/>
275 <param name="build" value="true" /> 517 <param name="map" value="new.6000.bim"/>
518 </section>
519 <section name="rel_app" >
520 <param name="build" value="true" />
521 </section>
276 <param name="use_log" value="true" /> 522 <param name="use_log" value="true" />
277 <output name="kingoutlog" > 523 <output name="kingoutlog" >
278 <assert_contents> 524 <assert_contents>
279 <has_text text="--build" /> 525 <has_text text="--build" />
280 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." /> 526 <has_text text="Autosome genotypes stored in 94 words for each of 332 individuals." />
281 <has_text text="Update-ID information is saved in file kingupdateids.txt" /> 527 <has_text text="Update-ID information is saved in file kingupdateids.txt" />
282 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" /> 528 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" />
283 </assert_contents> 529 </assert_contents>
284 </output> 530 </output>
285 </test> 531 </test>
286 <test> 532 <test expect_num_outputs="3">
287 <param name="genotype" value="new.6000.bed"/> 533 <param name="genotype" value="new.6000.bed"/>
288 <param name="family" value="new.6000.fam"/> 534 <section name="opt_int" >
289 <param name="map" value="new.6000.bim"/> 535 <param name="family" value="new.6000.fam"/>
290 <param name="build" value="true" /> 536 <param name="map" value="new.6000.bim"/>
291 <param name="degree" value="2" /> 537 </section>
538 <section name="rel_app" >
539 <param name="build" value="true" />
540 </section>
541 <section name="inf_param" >
542 <param name="degree" value="2" />
543 </section>
292 <param name="use_log" value="true" /> 544 <param name="use_log" value="true" />
293 <output name="kingoutlog"> 545 <output name="kingoutlog">
294 <assert_contents> 546 <assert_contents>
295 <has_text text="--build" /> 547 <has_text text="--build" />
296 <has_text text="--degree 2" /> 548 <has_text text="--degree 2" />
297 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" /> 549 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" />
298 <has_text text="Update-parent information is saved in file kingupdateparents.txt" /> 550 <has_text text="Update-parent information is saved in file kingupdateparents.txt" />
299 </assert_contents> 551 </assert_contents>
300 </output> 552 </output>
301 </test> 553 </test>
302 <test> 554 <test expect_num_outputs="3">
303 <param name="genotype" value="new.6000.bed"/> 555 <param name="genotype" value="new.6000.bed"/>
304 <param name="family" value="new.6000.fam"/> 556 <section name="opt_int" >
305 <param name="map" value="new.6000.bim"/> 557 <param name="family" value="new.6000.fam"/>
306 <param name="cluster" value="true" /> 558 <param name="map" value="new.6000.bim"/>
559 </section>
560 <section name="rel_app" >
561 <param name="cluster" value="true" />
562 </section>
307 <param name="use_log" value="true" /> 563 <param name="use_log" value="true" />
308 <output name="kingoutlog"> 564 <output name="kingoutlog">
309 <assert_contents> 565 <assert_contents>
310 <has_text text="--cluster" /> 566 <has_text text="--cluster" />
311 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" /> 567 <has_text text="Total length of 6 chromosomal segments usable for IBD segment analysis is" />
312 <has_text text="Pair-wise relatedness in newly clustered families saved in kingcluster.kin." /> 568 <has_text text="Pair-wise relatedness in newly clustered families saved in kingcluster.kin." />
313 </assert_contents> 569 </assert_contents>
314 </output> 570 </output>
315 </test> 571 </test>
572 <test> <!-- risk prediction -->
573 <param name="genotype" value="new.6000.bed"/>
574 <section name="opt_int" >
575 <param name="family" value="new.6000.fam"/>
576 <param name="map" value="new.6000.bim"/>
577 </section>
578 <section name="gen_rsk">
579 <param name="model" ftype="txt" value="test.model" />
580 <param name="risk" value="true"/>
581 <param name="prevalence" value="0.004"/>
582 <param name="noflip" value="true" />
583 </section>
584 <param name="use_log" value="true" />
585 <output name="kingoutlog" >
586 <assert_contents>
587 <has_text text="rs2602970 11 T A 0.265 0.403 C T 0.474 SWITCHED" />
588 <has_text text="rs1161312 17 C T 0.459 0.295 G A 0.408 FLIPPED" />
589 </assert_contents>
590 </output>
591 <output_collection name="kingoutput_txt" count="1">
592 <element name="grs" >
593 <assert_contents>
594 <has_text text="13292 NA07014 1.000 1.000 4.917 3.243 0.0006 0.9927" />
595 </assert_contents>
596 </element>
597 </output_collection>
598 </test>
599 <test expect_num_outputs="3" > <!-- association mapping 1 -->
600 <param name="genotype" value="new.6000.bed"/>
601 <section name="opt_int" >
602 <param name="family" value="new.6000.fam"/>
603 <param name="map" value="new.6000.bim"/>
604 </section>
605 <section name="dis_ass">
606 <param name="tdt" value="true" />
607 </section>
608 <param name="use_log" value="true" />
609 <output name="kingoutlog" >
610 <assert_contents>
611 <has_text text="There are no parent-affected-offspring trios in the data." />
612 </assert_contents>
613 </output>
614 </test>
615 <test expect_num_outputs="3"> <!-- association mapping 2 -->
616 <param name="genotype" value="new.6000.bed"/>
617 <section name="opt_int" >
618 <param name="family" value="new.6000.fam"/>
619 <param name="map" value="new.6000.bim"/>
620 </section>
621 <section name="ass_mod">
622 <param name="covariate" value="," />
623 </section>
624 <section name="qnt_trt" >
625 <param name="mtscore" value="false"/>
626 </section>
627 <section name="ass_par">
628 <param name="invnorm" value="true" />
629 <param name="maxP" value="5e-8"/>
630 </section>
631 <param name="use_log" value="true" />
632 <output name="kingoutlog" >
633 <assert_contents>
634 <has_text_matching expression="Inference\s+0\s+1\s+1\s+0" />
635 </assert_contents>
636 </output>
637 <output_collection name="kingoutput_txt" count="3" >
638 <element name="allsegs" >
639 <assert_contents>
640 <has_text_matching expression="1\s+1\s+51\.\d+\s+95\.\d+\s+44\.\d+\s+294\s+rs7534689\s+rs1858111" />
641 </assert_contents>
642 </element>
643 <element name="kin0" >
644 <assert_contents>
645 <has_text_matching expression="FID1\s+ID1\s+FID2\s+ID2\s+N_SNP\s+HetHet\s+IBS0\s+HetConc\s+HomIBS0\s+Kinship\s+IBD1Seg\s+IBD2Seg\s+PropIBD\s+InfType" />
646 </assert_contents>
647 </element>
648 </output_collection>
649 </test>
650 <test expect_num_outputs="4" > <!-- ancestry inferrence -->
651 <param name="genotype" value="new.6000.bed"/>
652 <section name="opt_int" >
653 <param name="family" value="new.6000.fam"/>
654 <param name="map" value="new.6000.bim"/>
655 </section>
656 <section name="pop_str">
657 <param name="pca" value="true" />
658 </section>
659 <section name="str_par" >
660 <param name="projection" value="1"/>
661 </section>
662 <section name="opt_par">
663 <param name="rplot" value="true"/>
664 <param name="pngplot" value="true"/>
665 </section>
666 <param name="use_log" value="true" />
667 <output name="kingoutlog">
668 <assert_contents>
669 <has_text_matching expression="10\s+eigenvalues:\s+581\.\d+\s+114\.\d+\s+112\.\d+\s+111\.\d+\s+109\.\d+\s+109\.\d+\s+108\.\d+\s+108\.\d+\s+107\.\d+\s+107\.\d+" />
670 </assert_contents>
671 </output>
672 <output_collection name="kingoutput_txt" count="3" >
673 <element name="pc">
674 <assert_contents>
675 <has_text_matching expression="Y117\s+NA19239\s+0\s+0\s+1\s+1\s+.*" />
676 </assert_contents>
677 </element>
678 </output_collection>
679 <output_collection name="kingoutput_log" count="2" />
680 <output_collection name="kingoutput_pdf" count="1" >
681 <element name="pcplot" value="king_pcplot.png" compare="sim_size" delta="2500" />
682 </output_collection>
683 </test>
316 </tests> 684 </tests>
317 <help><![CDATA[ 685 <help><![CDATA[
318 686
319 `KING <http://people.virginia.edu/~wc9c/KING/>`_ is a toolset that makes use of high-throughput SNP data typically seen in a genome-wide association study (GWAS) 687 `KING <http://people.virginia.edu/~wc9c/KING/>`_ is a toolset that makes use of
320 or a sequencing project. Applications of KING include family relationship inference and pedigree error checking, 688 high-throughput SNP data typically seen in a genome-wide association study (GWAS) or a
321 quality control, population substructure identification, forensics, gene mapping, etc. 689 sequencing project. Applications of KING include family relationship inference and
690 pedigree error checking, quality control, population substructure identification,
691 forensics, gene mapping, etc.
322 692
323 ]]> 693 ]]>
324 </help> 694 </help>
325 <citations> 695 <citations>
326 <citation type="doi">10.1093/bioinformatics/btq559</citation> 696 <citation type="doi">10.1093/bioinformatics/btq559</citation>
327 </citations> 697 </citations>
328 </tool> 698 </tool>
699