comparison bcftools_gtcheck.xml @ 0:85dc172ae24f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit ef90c4602bdb83ea7455946c9d175ea27284e643
author iuc
date Wed, 06 Jul 2016 07:03:34 -0400
parents
children 025adf89e10d
comparison
equal deleted inserted replaced
-1:000000000000 0:85dc172ae24f
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
3 <description>Check sample identity</description>
4 <macros>
5 <token name="@EXECUTABLE@">gtcheck</token>
6 <import>macros.xml</import>
7 </macros>
8 <expand macro="requirements" />
9 <expand macro="version_command" />
10 <command detect_errors="aggressive"><![CDATA[
11 @PREPARE_ENV@
12 @PREPARE_INPUT_FILE@
13 #set $section = $sec_restrict
14 @PREPARE_TARGETS_FILE@
15 #set $section = $sec_default
16 #set $genotypes_vcf = None
17 #if $section.genotypes:
18 #if $section.genotypes.datatype.file_ext == 'vcf'
19 #set $genotypes_vcf = 'genotypes.vcf.gz'
20 bgzip -c "$section.genotypes" > $genotypes_vcf &&
21 bcftools index $genotypes_vcf &&
22 #elif $section.genotypes.datatype.file_ext == 'bcf'
23 #set $genotypes_vcf = 'genotypes.bcf'
24 ln -s "$ection.genotypes" $genotypes_vcf &&
25 #if $section.genotypes.metadata.bcf_index:
26 ln -s $section.genotypes.metadata.bcf_index ${genotypes_vcf}.csi &&
27 #else
28 bcftools index $genotypes_vcf &&
29 #end if
30 #end if
31 #end if
32
33 bcftools @EXECUTABLE@
34
35 ## Default section
36 #set $section = $sec_default
37
38 #if $genotypes_vcf:
39 --genotypes $genotypes_vcf
40 #end if
41
42 #if $section.genotypes:
43 --genotypes "${section.genotypes}"
44 #end if
45
46 ${section.all_sites}
47
48 #if $section.GTs_only:
49 --GTs-only "${section.GTs_only}"
50 #end if
51
52 ${section.homs_only}
53
54 #if $section.plot:
55 --plot "${section.plot}"
56 #end if
57
58 #if $section.query_sample:
59 --query-sample "${section.query_sample}"
60 #end if
61
62 #if $section.target_sample:
63 --target-sample "${section.target_sample}"
64 #end if
65
66 #set $section = $sec_restrict
67 @REGIONS@
68 @TARGETS@
69
70 ## Primary Input/Outputs
71
72 @INPUT_FILE@
73 > "$output_file"
74 ]]>
75 </command>
76 <inputs>
77 <expand macro="macro_input" />
78 <section name="sec_restrict" expanded="false" title="Restrict to">
79 <expand macro="macro_regions" />
80 <expand macro="macro_targets" />
81 </section>
82 <section name="sec_default" expanded="true" title="Default Options">
83 <param name="genotypes" type="data" format="vcf,bcf" label="Genotypes to compare against" optional="True"
84 help="(-g) Checks sample identity or wehn omitted a multi-sample cross-check is performed"/>
85 <param name="target_sample" type="text" label="Target Sample" optional="True" help="Target sample in the -g file (used only for plotting)" />
86 <param name="GTs_only" type="integer" label="Gts Only" default="99" optional="True" help="Use GTs, ignore PLs, using &lt;int&gt; for unseen genotypes" />
87 <param name="all_sites" type="boolean" truevalue="--all-sites" falsevalue="" label="All Sites" help="Output comparison for all sites" />
88 <param name="homs_only" type="boolean" truevalue="--homs-only" falsevalue="" label="Homs Only" help="Homozygous genotypes only (useful for low coverage data)" />
89 <param name="query_sample" type="text" label="Query Sample" optional="True" help="Query sample (by default the first sample is checked)" />
90 <param name="plot" type="text" label="Plot" help="Prefix name for plot" />
91 </section>
92 </inputs>
93 <outputs>
94 <data name="output_file" format="tabular" />
95 </outputs>
96 <tests>
97 <test>
98 <param name="input_file" ftype="vcf" value="view.vcf" />
99 <output name="output_file">
100 <assert_contents>
101 <has_text_matching expression="SM\t10328.0+\t80.68\t12\tNA00002\t0"/>
102 <has_text_matching expression="CN\t1174\t14\t75.57\tNA00002\tNA00001"/>
103 </assert_contents>
104 </output>
105 </test>
106 </tests>
107 <help><![CDATA[
108 =====================================
109 bcftools @EXECUTABLE@
110 =====================================
111
112 Check sample identity. With no -g BCF given, multi-sample cross-check is performed.
113
114 @REGIONS_HELP@
115 @TARGETS_HELP@
116
117 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
118
119 @BCFTOOLS_WIKI@
120
121 ]]>
122 </help>
123 <expand macro="citations" />
124 </tool>