comparison bcftools_stats.xml @ 0:92e47ae9a121 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:09:13 -0400
parents
children 5129a2b2f316
comparison
equal deleted inserted replaced
-1:000000000000 0:92e47ae9a121
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
3 <description>Parses VCF or BCF and produces stats which can be plotted using plot-vcfstats</description>
4 <macros>
5 <token name="@EXECUTABLE@">stats</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 #set $section = $sec_restrict
14 @PREPARE_TARGETS_FILE@
15 ## Stats section
16 #set $section = $sec_default
17 @PREPARE_FASTA_REF@
18 @PREPARE_EXONS_FILE@
19
20 bcftools @EXECUTABLE@
21
22 ## Stats section
23 #set $section = $sec_default
24 @FASTA_REF@
25 @EXONS_FILE@
26 ${section.first_allele_only}
27 #if $section.depth.set_depth == 'yes':
28 --depth "${section.depth.depth_min},${section.depth.depth_max},${section.depth.depth_bin_size}"
29 #end if
30 #if $section.user_tstv:
31 --user-tstv "${section.user_tstv}"
32 #end if
33 #if len($input_vcfs) == 1:
34 ${section.split_by_ID}
35 #end if
36 ${section.verbose}
37
38 ## Stats section
39 #set $section = $sec_restrict
40 @APPLY_FILTERS@
41 @COLLAPSE@
42 @REGIONS@
43 @SAMPLES@
44 @TARGETS@
45 @INCLUDE@
46 @EXCLUDE@
47
48 ## Primary Input/Outputs
49 @INPUT_FILES@
50 > $output_file
51 ## requires: matplotlib and pdflatex
52 #if $plot_title:
53 && plot-vcfstats -p 'plot_tmp/' -T $plot_title -s $output_file
54 #end if
55 ]]>
56 </command>
57 <inputs>
58 <expand macro="macro_inputs" />
59 <section name="sec_restrict" expanded="false" title="Restrict to">
60 <expand macro="macro_samples" />
61 <expand macro="macro_apply_filters" />
62 <expand macro="macro_collapse" />
63 <expand macro="macro_regions" />
64 <expand macro="macro_targets" />
65 <expand macro="macro_include" />
66 <expand macro="macro_exclude" />
67 </section>
68 <section name="sec_default" expanded="true" title="Stats Options">
69 <param name="first_allele_only" type="boolean" truevalue="--1st-allele-only" falsevalue="" label="1St Allele Only"
70 help="Include only 1st allele at multiallelic sites" />
71 <conditional name="depth">
72 <param name="set_depth" type="select" label="depth distribution: min,max,bin_size [0,500,1]">
73 <option value="no">use depth defaults</option>
74 <option value="yes">set depth</option>
75 </param>
76 <when value="no"/>
77 <when value="yes">
78 <param name="depth_min" type="integer" value="0" min="0" label="Depth min"/>
79 <param name="depth_max" type="integer" value="500" min="1" label="Depth max" />
80 <param name="depth_bin_size" type="integer" value="1" min="1" label="Depth bin size" />
81 </when>
82 </conditional>
83 <param name="fasta_ref" type="data" format="data" label="Fasta Ref" optional="True" help="Reference sequence" />
84 <expand macro="macro_exons_file" />
85 <param name="split_by_ID" type="boolean" truevalue="--split-by-ID" falsevalue="" label="Split By Id (Ignored on multiple inputs)"
86 help="Collect stats for sites with ID separately (known vs novel)" />
87 <param name="user_tstv" type="text" value="" optional="true" label="User Tstv"
88 help="Collect Ts/Tv stats for any tag using the given binning: TAG[:min:max:binsize]" >
89 <validator type="regex" message="TAG optionally followed by :min:max:binsize">^([^ \t\n\r\f\v:,](:\d+:\d+:\d+)?)?$</validator>
90
91 </param>
92 <param name="verbose" type="boolean" truevalue="--verbose" falsevalue="" label="Verbose"
93 help="Produce verbose per-site and per-sample output" />
94 </section>
95 <param name="plot_title" type="text" value="" optional="true" label="Create a plots pdf with this title">
96 <validator type="regex" message="">^\w.*\w$</validator>
97 </param>
98 </inputs>
99 <outputs>
100 <data name="output_file" format="txt"/>
101 <data name="output_pdf" format="pdf">
102 <filter>plot_title</filter>
103 </data>
104 </outputs>
105 <tests>
106 <test>
107 <param name="input_files" ftype="vcf" value="stats.b.vcf,stats.a.vcf" />
108 <output name="output_file">
109 <assert_contents>
110 <has_text_matching expression="SN\t0\tnumber of samples:\t3"/>
111 <has_text_matching expression="SN\t1\tnumber of samples:\t3"/>
112 </assert_contents>
113 </output>
114 </test>
115 <test>
116 <param name="input_files" ftype="vcf" value="mpileup.vcf" />
117 <output name="output_file">
118 <assert_contents>
119 <has_text_matching expression="SN\t0\tnumber of samples:\t3"/>
120 <has_text_matching expression="SN\t0\tnumber of records:\t4103"/>
121 <has_text_matching expression="ST\t0\tA>C\t16"/>
122 </assert_contents>
123 </output>
124 </test>
125 </tests>
126 <help><![CDATA[
127 =====================================
128 bcftools @EXECUTABLE@
129 =====================================
130
131 Parses VCF or BCF and produces stats which can be plotted using plot-vcfstats.
132
133 When two files are given, the program generates separate stats for intersection and the complements.
134 By default only sites are compared, -s/-S must given to include also sample columns.
135
136 @COLLAPSE_HELP@
137 @REGIONS_HELP@
138 @TARGETS_HELP@
139 @EXPRESSIONS_HELP@
140
141 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
142
143 @BCFTOOLS_WIKI@
144 ]]>
145 </help>
146 <expand macro="citations" />
147 </tool>