annotate samtools_stats.xml @ 0:0d71d9467847 draft

Uploaded
author devteam
date Wed, 22 Apr 2015 10:29:35 -0400
parents
children 24c5d43cb545
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0d71d9467847 Uploaded
devteam
parents:
diff changeset
1 <tool id="samtools_stats" name="Stats" version="2.0">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
2 <description>generate statistics for BAM dataset</description>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
3 <macros>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
4 <import>macros.xml</import>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
5 </macros>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
6 <expand macro="requirements"></expand>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
7 <expand macro="stdio"></expand>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
8 <expand macro="version_command"></expand>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
9 <command><![CDATA[
0d71d9467847 Uploaded
devteam
parents:
diff changeset
10 #if $use_reference.use_ref_selector == "yes":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
11 #if $use_reference.reference_source.reference_source_selector == "history":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
12 ln -s "${use_reference.reference_source.ref_file}" && samtools faidx `basename "${use_reference.reference_source.ref_file}"` && samtools stats
0d71d9467847 Uploaded
devteam
parents:
diff changeset
13 #else:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
14 samtools stats
0d71d9467847 Uploaded
devteam
parents:
diff changeset
15 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
16 #else:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
17 samtools stats
0d71d9467847 Uploaded
devteam
parents:
diff changeset
18 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
19 "${input_file}"
0d71d9467847 Uploaded
devteam
parents:
diff changeset
20 --coverage ${coverage_min},${coverage_max},${coverage_step}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
21 ${remove_dups}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
22 #if str( $filter_by_flags.filter_flags ) == "filter":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
23 #if $filter_by_flags.require_flags:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
24 --required-flag ${sum([int(flag) for flag in str($filter_by_flags.require_flags).split(',')])}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
25 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
26 #if $filter_by_flags.exclude_flags:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
27 --filtering-flag ${sum([int(flag) for flag in str($filter_by_flags.exclude_flags).split(',')])}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
28 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
29 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
30 --GC-depth ${gc_depth}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
31 --insert-size ${insert_size}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
32
0d71d9467847 Uploaded
devteam
parents:
diff changeset
33 ## The code below is commented out because using -I/--id options causes the following exception
0d71d9467847 Uploaded
devteam
parents:
diff changeset
34 ## Samtools-htslib: init_group_id() header parsing not yet implemented
0d71d9467847 Uploaded
devteam
parents:
diff changeset
35
0d71d9467847 Uploaded
devteam
parents:
diff changeset
36 ##if str($read_group) != "":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
37 ## -I "${read_group}"
0d71d9467847 Uploaded
devteam
parents:
diff changeset
38 ##end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
39
0d71d9467847 Uploaded
devteam
parents:
diff changeset
40 #if str($read_length) != "0":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
41 --read-length "${read_length}"
0d71d9467847 Uploaded
devteam
parents:
diff changeset
42 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
43 --most-inserts ${most_inserts}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
44 --trim-quality ${trim_quality}
0d71d9467847 Uploaded
devteam
parents:
diff changeset
45 #if $use_reference.use_ref_selector == "yes":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
46 #if $use_reference.reference_source.reference_source_selector != "history":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
47 --ref-seq "${use_reference.reference_source.ref_file.fields.path}"
0d71d9467847 Uploaded
devteam
parents:
diff changeset
48 #else:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
49 --ref-seq "${use_reference.reference_source.ref_file}"
0d71d9467847 Uploaded
devteam
parents:
diff changeset
50 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
51 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
52 > "${output}"
0d71d9467847 Uploaded
devteam
parents:
diff changeset
53 #if $split_output.split_output_selector == "yes":
0d71d9467847 Uploaded
devteam
parents:
diff changeset
54 #set outputs_to_split = str($split_output.generate_tables).split(',')
0d71d9467847 Uploaded
devteam
parents:
diff changeset
55 && mkdir split && echo ${split_output.generate_tables} &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
56
0d71d9467847 Uploaded
devteam
parents:
diff changeset
57 #if 'sn' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
58 echo "# Summary Numbers\n" > "split/Summary numbers.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
59 grep -q ^SN "${output}" ; if [ $? = 0 ] ; then grep ^SN "${output}" | cut -f 2- >> "split/Summary numbers.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
60 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
61
0d71d9467847 Uploaded
devteam
parents:
diff changeset
62 #if 'ffq' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
63 echo "# Columns correspond to qualities and rows to cycles. First column is the cycle number\n" > "split/First Fragment Qualities.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
64 grep -q ^FFQ "${output}" ; if [ $? = 0 ] ; then grep ^FFQ "${output}" | cut -f 2- >> "split/First Fragment Qualities.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
65 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
66
0d71d9467847 Uploaded
devteam
parents:
diff changeset
67 #if 'lfq' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
68 echo "# Columns correspond to qualities and rows to cycles. First column is the cycle number" > "split/Last Fragment Qualities.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
69 grep -q ^LFQ "${output}" ; if [ $? = 0 ] ; then grep ^LFQ "${output}" | cut -f 2- >> "split/Last Fragment Qualities.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
70 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
71
0d71d9467847 Uploaded
devteam
parents:
diff changeset
72 #if 'mpc' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
73 echo "# Columns correspond to qualities, rows to cycles. First column is the cycle number, second is the number of N's and the rest is the number of mismatches" > "split/Mismatches per cycle.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
74 grep -q ^MPC "${output}" ; if [ $? = 0 ] ; then grep ^MPC "${output}" | cut -f 2- >> "split/Mismatches per cycle.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
75 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
76
0d71d9467847 Uploaded
devteam
parents:
diff changeset
77 #if 'gcf' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
78 echo "# GC Content of first fragments" > "split/GC Content of first fragments.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
79 grep -q ^GCF "${output}" ; if [ $? = 0 ] ; then grep ^GCF "${output}" | cut -f 2- >> "split/GC Content of first fragments.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
80 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
81
0d71d9467847 Uploaded
devteam
parents:
diff changeset
82 #if 'gcl' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
83 echo "# GC Content of last fragments" > "split/GC Content of last fragments.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
84 grep -q ^GCL "${output}" ; if [ $? = 0 ] ; then grep ^GCL "${output}" | cut -f 2- >> "split/GC Content of last fragments.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
85 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
86
0d71d9467847 Uploaded
devteam
parents:
diff changeset
87 #if 'gcc' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
88 echo "# ACGT content per cycle. The columns are: cycle, and A,C,G,T counts (percent)" > "split/ACGT content per cycle.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
89 grep -q ^GCC "${output}" ; if [ $? = 0 ] ; then grep ^GCC "${output}" | cut -f 2- >> "split/ACGT content per cycle.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
90 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
91
0d71d9467847 Uploaded
devteam
parents:
diff changeset
92 #if 'is' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
93 echo "# Insert sizes. The columns are: insert size, pairs total, inward oriented pairs, outward oriented pairs, other pairs" > "split/Insert sizes.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
94 grep -q ^IS "${output}" ; if [ $? = 0 ] ; then grep ^IS "${output}" | cut -f 2- >> "split/Insert sizes.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
95 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
96
0d71d9467847 Uploaded
devteam
parents:
diff changeset
97 #if 'rl' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
98 echo "# Read lengths. The columns are: read length, count" > "split/Read lengths.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
99 grep -q ^RL "${output}" ; if [ $? = 0 ] ; then grep ^RL "${output}" | cut -f 2- >> "split/Read lengths.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
100 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
101
0d71d9467847 Uploaded
devteam
parents:
diff changeset
102 #if 'id' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
103 echo "# Indel distribution. The columns are: length, number of insertions, number of deletions" > "split/Indel distribution.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
104 grep -q ^ID "${output}" ; if [ $? = 0 ] ; then grep ^ID "${output}" | cut -f 2- >> "split/Indel distribution.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
105 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
106
0d71d9467847 Uploaded
devteam
parents:
diff changeset
107 #if 'ic' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
108 echo "# Indels per cycle. The columns are: cycle, number of insertions (fwd), .. (rev) , number of deletions (fwd), .. (rev)" > "split/Indels per cycle.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
109 grep -q ^IC "${output}" ; if [ $? = 0 ] ; then grep ^IC "${output}" | cut -f 2- >> "split/Indels per cycle.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
110 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
111
0d71d9467847 Uploaded
devteam
parents:
diff changeset
112 #if 'cov' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
113 echo "# Coverage distribution" > "split/Coverage distribution.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
114 grep -q ^COV "${output}" ; if [ $? = 0 ] ; then grep ^COV "${output}" | cut -f 2- >> "split/Coverage distribution.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
115 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
116
0d71d9467847 Uploaded
devteam
parents:
diff changeset
117 #if 'gcd' in $outputs_to_split:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
118 echo "# GC-depth. The columns are: GC%, unique sequence percentiles, 10th, 25th, 50th, 75th and 90th depth percentile" > "split/GC depth.tab" &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
119 grep -q ^GCD "${output}" ; if [ $? = 0 ] ; then grep ^GCD "${output}" | cut -f 2- >> "split/GC depth.tab" ; fi &&
0d71d9467847 Uploaded
devteam
parents:
diff changeset
120 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
121
0d71d9467847 Uploaded
devteam
parents:
diff changeset
122 ## Unix true command below
0d71d9467847 Uploaded
devteam
parents:
diff changeset
123
0d71d9467847 Uploaded
devteam
parents:
diff changeset
124 true
0d71d9467847 Uploaded
devteam
parents:
diff changeset
125
0d71d9467847 Uploaded
devteam
parents:
diff changeset
126 #end if
0d71d9467847 Uploaded
devteam
parents:
diff changeset
127 ]]></command>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
128 <inputs>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
129 <param name="input_file" type="data" format="sam,bam" label="BAM file" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
130 <param name="coverage_min" type="integer" value="1" label="Minimum coverage" help="minimum coverage value for --coverage option"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
131 <param name="coverage_max" type="integer" value="1000" label="Maximum coverage" help="maximum coverage value for --coverage option"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
132 <param name="coverage_step" type="integer" value="1" label="Coverage step" help="step value for --coverage option"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
133 <param name="remove_dups" type="boolean" truevalue="--remove-dups" falsevalue="" checked="False" label="Exclude reads marked as duplicates" help="--remove-dups; default = False"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
134 <conditional name="split_output">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
135 <param name="split_output_selector" type="select" label="Output" help="Select between a single output or separate outputs for each statistics">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
136 <option value="no" selected="True">a single summary file</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
137 <option value="yes">separate datasets for each statistics</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
138 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
139 <when value="no" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
140 <when value="yes">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
141 <param name="generate_tables" type="select" display="checkboxes" multiple="True" label="Statistics to extract">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
142 <option value="sn">Summary numbers</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
143 <option value="ffq">First Fragment Qualities</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
144 <option value="lfq">Last Fragment Qualities</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
145 <option value="mpc">Mismatches per cycle</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
146 <option value="gcf">GC Content of first fragments</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
147 <option value="gcl">GC Content of last fragments</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
148 <option value="gcc">ACGT content per cycle</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
149 <option value="is">Insert sizes</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
150 <option value="rl">Read lengths</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
151 <option value="id">Indel distribution</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
152 <option value="ic">Indels per cycle</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
153 <option value="cov">Coverage distribution</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
154 <option value="gcd">GC depth</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
155 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
156 </when>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
157 </conditional>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
158 <conditional name="filter_by_flags">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
159 <param name="filter_flags" type="select" label="Set filter by flags" help="-f and -F options">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
160 <option value="nofilter" selected="True">Do not filter</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
161 <option value="filter">Filter by flags to exclude or require</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
162 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
163 <when value="filter">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
164 <param name="require_flags" type="select" display="checkboxes" multiple="True" label="Require" help="-f">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
165 <option value="1">Read is paired</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
166 <option value="2">Read is mapped in a proper pair</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
167 <option value="4">The read is unmapped</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
168 <option value="8">The mate is unmapped</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
169 <option value="16">Read strand</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
170 <option value="32">Mate strand</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
171 <option value="64">Read is the first in a pair</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
172 <option value="128">Read is the second in a pair</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
173 <option value="256">The alignment or this read is not primary</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
174 <option value="512">The read fails platform/vendor quality checks</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
175 <option value="1024">The read is a PCR or optical duplicate</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
176 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
177 <param name="exclude_flags" type="select" display="checkboxes" multiple="True" label="Exclude" help="-F">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
178 <option value="1">Read is paired</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
179 <option value="2">Read is mapped in a proper pair</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
180 <option value="4">The read is unmapped</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
181 <option value="8">The mate is unmapped</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
182 <option value="16">Read strand</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
183 <option value="32">Mate strand</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
184 <option value="64">Read is the first in a pair</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
185 <option value="128">Read is the second in a pair</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
186 <option value="256">The alignment or this read is not primary</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
187 <option value="512">The read fails platform/vendor quality checks</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
188 <option value="1024">The read is a PCR or optical duplicate</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
189 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
190 </when>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
191 <when value="nofilter" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
192
0d71d9467847 Uploaded
devteam
parents:
diff changeset
193 </conditional>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
194 <param name="gc_depth" type="float" value="20000" label="GC-depth bin size" help="--GC-depth; decreasing bin size increases memory requirement; default = 20000.0"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
195 <param name="insert_size" type="integer" value="8000" label="Maximum insert size" help="--insert-size; default = 8000"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
196
0d71d9467847 Uploaded
devteam
parents:
diff changeset
197 <!--
0d71d9467847 Uploaded
devteam
parents:
diff changeset
198
0d71d9467847 Uploaded
devteam
parents:
diff changeset
199 The -I option of samtools stats returns the following message in version 1.2:
0d71d9467847 Uploaded
devteam
parents:
diff changeset
200
0d71d9467847 Uploaded
devteam
parents:
diff changeset
201 Samtools-htslib: init_group_id() header parsing not yet implemented
0d71d9467847 Uploaded
devteam
parents:
diff changeset
202 Abort trap: 6
0d71d9467847 Uploaded
devteam
parents:
diff changeset
203
0d71d9467847 Uploaded
devteam
parents:
diff changeset
204 Because of this the section below is commented out until this stats bug is fixed
0d71d9467847 Uploaded
devteam
parents:
diff changeset
205
0d71d9467847 Uploaded
devteam
parents:
diff changeset
206 <param name="read_group" type="select" optional="true" label="Limit to a specific read group name" >
0d71d9467847 Uploaded
devteam
parents:
diff changeset
207 <options>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
208 <filter type="data_meta" ref="input_file" key="read_groups" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
209 </options>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
210 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
211
0d71d9467847 Uploaded
devteam
parents:
diff changeset
212 -->
0d71d9467847 Uploaded
devteam
parents:
diff changeset
213
0d71d9467847 Uploaded
devteam
parents:
diff changeset
214 <param name="read_length" type="integer" value="0" label="Minimum read length to generate statistics for" help="--read-length; default = no cutoff"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
215 <param name="most_inserts" type="float" value="0.99" label="Report only the main part of inserts" help="--most-inserts; default = 0.99"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
216 <param name="trim_quality" type="integer" value="0" label="BWA trim parameter" help="--trim-quality; default = 0"/>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
217
0d71d9467847 Uploaded
devteam
parents:
diff changeset
218 <conditional name="use_reference">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
219 <param name="use_ref_selector" type="select" label="Use reference sequence" help="--ref-seq; required for GC-depth and mismatches-per-cycle calculation">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
220 <option value="yes">Use reference</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
221 <option selected="True" value="no">Do not use reference</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
222 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
223 <when value="yes">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
224 <conditional name="reference_source">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
225 <param name="reference_source_selector" type="select" label="Choose a reference sequence for GC depth">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
226 <option value="cached">Locally cached</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
227 <option value="history">History</option>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
228 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
229 <when value="cached">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
230 <param name="ref_file" type="select" label="Using genome">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
231 <options from_data_table="fasta_indexes" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
232 <filter type="data_meta" ref="input_file" key="dbkey" column="1" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
233 </param>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
234 </when>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
235 <when value="history">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
236 <param name="ref_file" type="data" format="fasta" label="Using file" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
237 </when>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
238 </conditional>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
239 </when>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
240 <when value="no" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
241 </conditional>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
242
0d71d9467847 Uploaded
devteam
parents:
diff changeset
243 </inputs>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
244
0d71d9467847 Uploaded
devteam
parents:
diff changeset
245 <outputs>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
246 <data format="tabular" name="output" label="${tool.name} on ${on_string}">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
247 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tab" ext="tabular" visible="true" directory="split" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
248 </data>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
249 </outputs>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
250 <tests>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
251 <test>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
252 <param name="input_file" value="samtools_stats_input.bam" ftype="bam" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
253 <param name="use_ref_selector" value="yes" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
254 <param name="reference_source_selector" value="history" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
255 <param name="ref_file" value="samtools_stats_ref.fa" ftype="fasta" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
256 <output name="output" file="samtools_stats_out1.tab" ftype="tabular" lines_diff="4" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
257 </test>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
258 <test>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
259 <param name="input_file" value="samtools_stats_input.bam" ftype="bam" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
260 <param name="use_ref_selector" value="yes" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
261 <param name="reference_source_selector" value="history" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
262 <param name="ref_file" value="samtools_stats_ref.fa" ftype="fasta" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
263 <param name="split_output_selector" value="yes" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
264 <param name="generate_tables" value="sn,mpc,gcc" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
265 <output name="output" file="samtools_stats_out2.tab" lines_diff="4">
0d71d9467847 Uploaded
devteam
parents:
diff changeset
266 <discovered_dataset designation="Summary numbers" ftype="tabular" file="samtools_stats_out2/sn.tab" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
267 <discovered_dataset designation="ACGT content per cycle" ftype="tabular" file="samtools_stats_out2/gcc.tab" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
268 <discovered_dataset designation="Mismatches per cycle" ftype="tabular" file="samtools_stats_out2/mpc.tab" />
0d71d9467847 Uploaded
devteam
parents:
diff changeset
269 </output>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
270 </test>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
271 </tests>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
272 <help><![CDATA[
0d71d9467847 Uploaded
devteam
parents:
diff changeset
273 **What it does**
0d71d9467847 Uploaded
devteam
parents:
diff changeset
274
0d71d9467847 Uploaded
devteam
parents:
diff changeset
275 This tool runs the ``samtools stats`` command. It has the following options::
0d71d9467847 Uploaded
devteam
parents:
diff changeset
276
0d71d9467847 Uploaded
devteam
parents:
diff changeset
277 -c, --coverage <int>,<int>,<int> Coverage distribution min,max,step [1,1000,1]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
278 -d, --remove-dups Exclude from statistics reads marked as duplicates
0d71d9467847 Uploaded
devteam
parents:
diff changeset
279 -f, --required-flag <str|int> Required flag, 0 for unset. See also `samtools flags` [0]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
280 -F, --filtering-flag <str|int> Filtering flag, 0 for unset. See also `samtools flags` [0]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
281 --GC-depth <float> the size of GC-depth bins (decreasing bin size increases memory requirement) [2e4]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
282 -h, --help This help message
0d71d9467847 Uploaded
devteam
parents:
diff changeset
283 -i, --insert-size <int> Maximum insert size [8000]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
284 -I, --id <string> Include only listed read group or sample name
0d71d9467847 Uploaded
devteam
parents:
diff changeset
285 -l, --read-length <int> Include in the statistics only reads with the given read length []
0d71d9467847 Uploaded
devteam
parents:
diff changeset
286 -m, --most-inserts <float> Report only the main part of inserts [0.99]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
287 -q, --trim-quality <int> The BWA trimming parameter [0]
0d71d9467847 Uploaded
devteam
parents:
diff changeset
288 -r, --ref-seq <file> Reference sequence (required for GC-depth and mismatches-per-cycle calculation). Galaxy
0d71d9467847 Uploaded
devteam
parents:
diff changeset
289 will provide options for selecting a reference cached as this Galaxy instance or choosing
0d71d9467847 Uploaded
devteam
parents:
diff changeset
290 one from history.
0d71d9467847 Uploaded
devteam
parents:
diff changeset
291
0d71d9467847 Uploaded
devteam
parents:
diff changeset
292
0d71d9467847 Uploaded
devteam
parents:
diff changeset
293 ]]></help>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
294 <expand macro="citations"></expand>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
295 </tool>
0d71d9467847 Uploaded
devteam
parents:
diff changeset
296