comparison bcftools_concat.xml @ 6:2d95ed0b720a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit e2075caee2ecdc6aed15a356e5328c5ca09cfb13
author iuc
date Thu, 08 Jun 2017 15:21:32 -0400
parents 40174941cbda
children 62ca6da715bf
comparison
equal deleted inserted replaced
5:40174941cbda 6:2d95ed0b720a
1 <?xml version='1.0' encoding='utf-8'?> 1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0"> 2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.1">
3 <description>Concatenate or combine VCF/BCF files</description> 3 <description>Concatenate or combine VCF/BCF files</description>
4 <macros> 4 <macros>
5 <token name="@EXECUTABLE@">concat</token> 5 <token name="@EXECUTABLE@">concat</token>
6 <import>macros.xml</import> 6 <import>macros.xml</import>
7 </macros> 7 </macros>
16 bcftools @EXECUTABLE@ 16 bcftools @EXECUTABLE@
17 17
18 ## Default section 18 ## Default section
19 #set $section = $sec_default 19 #set $section = $sec_default
20 20
21 #if $section.overlaps.allow_overlaps == 'yes': 21 #if $section.mode.naive == "yes":
22 --allow-overlaps 22 --naive
23 #if $section.overlaps.rm_dups: 23 #else:
24 --rm-dups $section.overlaps.rm_dups 24 #if $section.mode.overlaps.allow_overlaps == 'yes':
25 --allow-overlaps
26 #if $section.mode.overlaps.rm_dups:
27 --rm-dups $section.mode.overlaps.rm_dups
28 #end if
25 #end if 29 #end if
30 ${section.mode.ligate}
26 #end if 31 #end if
27 ${section.ligate}
28 ${section.compact_PS} 32 ${section.compact_PS}
29 #if $section.min_PQ: 33 #if $section.min_PQ:
30 --min-PQ "${section.min_PQ}" 34 --min-PQ "${section.min_PQ}"
31 #end if 35 #end if
32 36
36 @OUTPUT_TYPE@ 40 @OUTPUT_TYPE@
37 @THREADS@ 41 @THREADS@
38 42
39 ## Primary Input/Outputs 43 ## Primary Input/Outputs
40 @INPUT_FILES@ 44 @INPUT_FILES@
45 #if $sec_default.mode.naive == "yes" and $output_type == 'v':
46 > output.gz && bcftools index output.gz && bcftools view -O v -o '$output_file' output.gz
47 #else:
41 > '$output_file' 48 > '$output_file'
49 #end if
42 ]]> 50 ]]>
43 </command> 51 </command>
44 <inputs> 52 <inputs>
45 <expand macro="macro_inputs" /> 53 <expand macro="macro_inputs" />
46 <section name="sec_restrict" expanded="false" title="Restrict to"> 54 <section name="sec_restrict" expanded="false" title="Restrict to">
47 <expand macro="macro_regions" /> 55 <expand macro="macro_regions" />
48 </section> 56 </section>
49 <section name="sec_default" expanded="true" title="Concat Options"> 57 <section name="sec_default" expanded="true" title="Concat Options">
50 <conditional name="overlaps"> 58 <conditional name="mode">
51 <param name="allow_overlaps" type="select" label="Allow Overlaps"> 59 <param name="naive" type="select" label="naive concat">
52 <help> 60 <help><![CDATA[
53 First coordinate of the next file can precede last record of the current file. 61 --naive concatenates VCF or BCF files without recompression. This can be used used to combine results that were generated separately for each chromosome. This is very fast but requires that all files are of the same type (all VCF or all BCF) and have the same headers. This is because all tags and chromosome names in the BCF body rely on the implicit order of the contig and tag definitions in the header. Currently no sanity checks are in place. Dangerous, use with caution.
54 </help> 62 ]]></help>
63 <option value="no">No </option>
55 <option value="yes">Yes </option> 64 <option value="yes">Yes </option>
56 <option value="no">No </option>
57 </param> 65 </param>
58 <when value="yes"> 66 <when value="yes"/>
59 <param name="rm_dups" type="select" label="Remove duplicate" optional="True" > 67 <when value="no">
60 <help><![CDATA[ 68 <conditional name="overlaps">
61 Output duplicate records present in multiple files only once: 69 <param name="allow_overlaps" type="select" label="Allow Overlaps">
62 rm-dups <snps|indels|both|all|none> 70 <help>
63 ]]></help> 71 First coordinate of the next file can precede last record of the current file.
64 <option value="snps">snps - SNP records</option> 72 </help>
65 <option value="indels">indels - indel records</option> 73 <option value="yes">Yes </option>
66 <option value="both">both - both SNP and indel records</option> 74 <option value="no">No </option>
67 <option value="all">all - records</option> 75 </param>
68 <option value="none">none - output multiple records instead</option> 76 <when value="yes">
69 </param> 77 <param name="rm_dups" type="select" label="Remove duplicate" optional="True" >
78 <help><![CDATA[
79 Output duplicate records present in multiple files only once:
80 rm-dups <snps|indels|both|all|none>
81 ]]></help>
82 <option value="snps">snps - SNP records</option>
83 <option value="indels">indels - indel records</option>
84 <option value="both">both - both SNP and indel records</option>
85 <option value="all">all - records</option>
86 <option value="none">none - output multiple records instead</option>
87 </param>
88 </when>
89 <when value="no"/>
90 </conditional>
91 <param name="ligate" type="boolean" truevalue="--ligate" falsevalue="" label="Ligate"
92 help="Ligate phased VCFs by matching phase at overlapping haplotypes" />
70 </when> 93 </when>
71 <when value="no"/>
72 </conditional> 94 </conditional>
73 <param name="ligate" type="boolean" truevalue="--ligate" falsevalue="" label="Ligate"
74 help="Ligate phased VCFs by matching phase at overlapping haplotypes" />
75 <param name="compact_PS" type="boolean" truevalue="--compact-PS" falsevalue="" label="Compact Ps" 95 <param name="compact_PS" type="boolean" truevalue="--compact-PS" falsevalue="" label="Compact Ps"
76 help="Do not output PS tag at each site, only at the start of a new phase set block." /> 96 help="Do not output PS tag at each site, only at the start of a new phase set block." />
77 <param name="min_PQ" type="integer" label="Min Pq" value="30" optional="True" 97 <param name="min_PQ" type="integer" label="Min Pq" value="30" optional="True"
78 help="Break phase set if phasing quality is lower than &lt;int&gt;" /> 98 help="Break phase set if phasing quality is lower than &lt;int&gt;" />
79 </section> 99 </section>
90 <assert_contents> 110 <assert_contents>
91 <has_text_matching expression="1\t100"/> 111 <has_text_matching expression="1\t100"/>
92 <has_text_matching expression="3\t192"/> 112 <has_text_matching expression="3\t192"/>
93 </assert_contents> 113 </assert_contents>
94 </output> 114 </output>
95 </test> 115 </test>
116 <test>
117 <param name="input_files" ftype="vcf" value="concat.1.b.vcf,concat.1.a.vcf" />
118 <param name="naive" value="yes" />
119 <param name="output_type" value="v" />
120 <output name="output_file">
121 <assert_contents>
122 <has_text_matching expression="1\t100"/>
123 <has_text_matching expression="3\t192"/>
124 </assert_contents>
125 </output>
126 </test>
96 <test> 127 <test>
97 <param name="input_files" ftype="vcf" value="concat.2.b.vcf,concat.2.a.vcf" /> 128 <param name="input_files" ftype="vcf" value="concat.2.b.vcf,concat.2.a.vcf" />
98 <param name="allow_overlaps" value="yes" /> 129 <param name="allow_overlaps" value="yes" />
99 <param name="output_type" value="v" /> 130 <param name="output_type" value="v" />
100 <output name="output_file"> 131 <output name="output_file">
121 bcftools @EXECUTABLE@ plugin 152 bcftools @EXECUTABLE@ plugin
122 ===================================== 153 =====================================
123 154
124 Concatenate or combine VCF/BCF files. All source files must have the same sample columns appearing in the same order. The program can be used, for example, to concatenate chromosome VCFs into one VCF, or combine a SNP VCF and an indel VCF into one. The input files must be sorted by chr and position. The files must be given in the correct order to produce sorted VCF on output unless the -a, --allow-overlaps option is specified. 155 Concatenate or combine VCF/BCF files. All source files must have the same sample columns appearing in the same order. The program can be used, for example, to concatenate chromosome VCFs into one VCF, or combine a SNP VCF and an indel VCF into one. The input files must be sorted by chr and position. The files must be given in the correct order to produce sorted VCF on output unless the -a, --allow-overlaps option is specified.
125 156
157
158 Naive concatenation is useful when using a galaxy workflow that splits a BAM file by chromosome, processes each in parallel, then bcftools concat merges the results into a single VCF file:
159
160 BAM -> bamtools split => bcftools mpileup => bcftools call => bcftools concat -> VCF
161
162
126 @REGIONS_HELP@ 163 @REGIONS_HELP@
127 164
128 @BCFTOOLS_MANPAGE@#@EXECUTABLE@ 165 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
129 166
130 @BCFTOOLS_WIKI@ 167 @BCFTOOLS_WIKI@