comparison bcftools_merge.xml @ 0:5add48c63b9a 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:04:14 -0400
parents
children df40d7f9737c
comparison
equal deleted inserted replaced
-1:000000000000 0:5add48c63b9a
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
3 <description>Merge multiple VCF/BCF files from non-overlapping sample sets to create one multi-sample file</description>
4 <macros>
5 <token name="@EXECUTABLE@">merge</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_FILES@
13 bcftools @EXECUTABLE@
14
15 ## Header section
16 #set $section = $sec_header
17 ${section.print_header}
18 #if $section.use_header:
19 --use-header "${section.use_header}"
20 #end if
21
22 ## Merge section
23 #set $section = $sec_merge
24 ${section.force_samples}
25
26 #if $section.info_rules:
27 --info-rules "${section.info_rules}"
28 #end if
29
30 #if $section.merge:
31 --merge "${section.merge}"
32 #end if
33
34 #set $section = $sec_restrict
35 @APPLY_FILTERS@
36 @REGIONS@
37
38 @OUTPUT_TYPE@
39 @THREADS@
40
41 ## Primary Input/Outputs
42 @INPUT_FILES@
43 > "$output_file"
44 ]]>
45 </command>
46 <inputs>
47 <expand macro="macro_inputs" />
48 <section name="sec_restrict" expanded="false" title="Restrict to">
49 <expand macro="macro_apply_filters" />
50 <expand macro="macro_regions" />
51 </section>
52 <section name="sec_merge" expanded="true" title="Merge Options">
53 <param name="force_samples" type="boolean" truevalue="--force-samples" falsevalue="" label="Force Samples" help="Resolve duplicate sample names" />
54 <param name="info_rules" type="text" label="Info Rules" help="Rules for merging INFO fields (method is one of sum,avg,min,max,join) or &quot;-&quot; to turn off the default [DP:sum,DP4:sum]" />
55 <param name="merge" type="select" label="Merge" optional="True"
56 help="Allow multiallelic records for: snps|indels|both|all|none|id, see man page for details [both]" >
57 <option value="none">none - no new multiallelics, output multiple records instead</option>
58 <option value="snps">snps - allow multiallelic SNP records</option>
59 <option value="indels">indels - allow multiallelic indel records</option>
60 <option value="both">both - both SNP and indel records can be multiallelic</option>
61 <option value="all">all - SNP records can be merged with indel records</option>
62 <option value="id">id - merge by ID</option>
63 </param>
64 </section>
65 <section name="sec_header" expanded="false" title="Header Options">
66 <param name="use_header" type="data" format="vcf" label="Use Header" optional="True" help="Use the provided header" />
67 <param name="print_header" type="boolean" truevalue="--print-header" falsevalue="" label="Print Header" help="Print only the merged header and exit" />
68 </section>
69 <expand macro="macro_select_output_type" />
70 </inputs>
71 <outputs>
72 <expand macro="macro_vcf_output"/>
73 </outputs>
74 <tests>
75 <test>
76 <param name="input_files" ftype="vcf" value="merge.a.vcf,merge.b.vcf,merge.c.vcf" />
77 <param name="force_samples" value="true" />
78 <param name="output_type" value="v" />
79 <output name="output_file">
80 <assert_contents>
81 <has_text text="3000150" />
82 <has_text text="3188209" />
83 <has_text_matching expression="\tq10;q20\t[\s]*INDEL"/>
84 </assert_contents>
85 </output>
86 </test>
87 <test>
88 <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf" />
89 <param name="force_samples" value="true" />
90 <param name="merge" value="none" />
91 <param name="output_type" value="v" />
92 <output name="output_file">
93 <assert_contents>
94 <has_text_matching expression="1\t3000000\t.\tC\tCCG\t"/>
95 <has_text_matching expression="1\t3000000\t.\tC\tG\t"/>
96 </assert_contents>
97 </output>
98 </test>
99 <test>
100 <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf" />
101 <param name="force_samples" value="true" />
102 <param name="merge" value="both" />
103 <param name="output_type" value="v" />
104 <output name="output_file">
105 <assert_contents>
106 <has_text_matching expression="1\t3000150\t\.\tC\t(A,G|G,A)\t"/>
107 <has_text_matching expression="1\t3106154\t\.\tC\t(CC,CCC|CCC,CC)\t"/>
108 </assert_contents>
109 </output>
110 </test>
111 <test>
112 <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf" />
113 <param name="force_samples" value="true" />
114 <param name="merge" value="all" />
115 <param name="output_type" value="v" />
116 <output name="output_file">
117 <assert_contents>
118 <has_text_matching expression="1\t3000000\t\.\tC\t(CCG,G|G,CCG)\t"/>
119 </assert_contents>
120 </output>
121 </test>
122 <test>
123 <param name="input_files" ftype="vcf" value="merge.3.a.vcf,merge.3.b.vcf" />
124 <param name="force_samples" value="true" />
125 <param name="info_rules" value="TR:sum,TA:sum,TG:sum" />
126 <param name="output_type" value="v" />
127 <output name="output_file">
128 <assert_contents>
129 <has_text_matching expression="1\t3000000\t.\tC\t(CG,CCG|CCG,CG)\t"/>
130 <has_text_matching expression="TR=[^;\t]*11"/>
131 </assert_contents>
132 </output>
133 </test>
134 <test>
135 <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf" />
136 <param name="force_samples" value="true" />
137 <param name="merge" value="id" />
138 <param name="output_type" value="v" />
139 <output name="output_file">
140 <assert_contents>
141 <has_text_matching expression="1\t3000000\tid1\tC\t(A,CCG|CCG,A)\t"/>
142 </assert_contents>
143 </output>
144 </test>
145 </tests>
146 <help><![CDATA[
147 =====================================
148 bcftools @EXECUTABLE@
149 =====================================
150
151
152 Merge multiple VCF/BCF files from non-overlapping sample sets to create one multi-sample file.
153
154 Note that only records from different files can be merged, never from the same file.
155 For "vertical" merge take a look at "bcftools norm" instead.
156
157 @REGIONS_HELP@
158
159 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
160
161 @BCFTOOLS_WIKI@
162 ]]>
163 </help>
164 <expand macro="citations" />
165 </tool>