comparison bamtools.xml @ 3:04866f817daa draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/bamtools/bamtools commit ddee21fa767f3234a4e5a9acfeeabdded32e7d01
author devteam
date Wed, 18 Jan 2017 11:47:11 -0500
parents ea3fc1adee75
children 4d343c1f606b
comparison
equal deleted inserted replaced
2:ea3fc1adee75 3:04866f817daa
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bamtools" name="Convert, Merge, Randomize" version="0.0.2"> 2 <tool id="bamtools" name="Convert, Merge, Randomize" version="2.4.0">
3 <description>BAM datasets and perform other transformations</description> 3 <description>BAM datasets and perform other transformations</description>
4 <requirements> 4 <requirements>
5 <requirement type="package" version="2.3.0_2d7685d2ae">bamtools</requirement> 5 <requirement type="package" version="2.4.0">bamtools</requirement>
6 <requirement type="package" version="0.1.18">samtools</requirement> 6 <requirement type="package" version="1.3.1">samtools</requirement>
7 </requirements> 7 </requirements>
8 8 <stdio>
9 <command> 9 <exit_code range="1:" />
10 ##set up input files 10 </stdio>
11 11 <command>
12 #for $bam_count, $input_bam in enumerate( $input_bams ): 12 <![CDATA[
13 ln -s "${input_bam}" "localbam_${bam_count}.bam" &amp;&amp; 13 ##set up input files
14 ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &amp;&amp; 14 #for $bam_count, $input_bam in enumerate( $input_bams ):
15 #end for 15 ln -s "${input_bam}" "localbam_${bam_count}.bam" &&
16 16 ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &&
17 #if str( $analysis_type.analysis_type_selector ) == "convert": 17 #end for
18 #if str( $analysis_type.format_type.format_type_selector ) == "pileup": 18 #if str( $analysis_type.analysis_type_selector ) == "convert":
19 #set $reference_fasta_filename = "localref.fa" 19 #if str( $analysis_type.format_type.format_type_selector ) == "pileup":
20 #if str( $analysis_type.format_type.reference_source.reference_source_selector ) == "history": 20 #set $reference_fasta_filename = "localref.fa"
21 ln -s "${analysis_type.format_type.reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp; 21 #if str( $analysis_type.format_type.reference_source.reference_source_selector ) == "history":
22 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for bamtools convert" &gt;&amp;2 &amp;&amp; 22 ln -s "${analysis_type.format_type.reference_source.ref_file}" "${reference_fasta_filename}" &&
23 #else: 23 samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for bamtools convert" >&2 &&
24 #set $reference_fasta_filename = str( $analysis_type.format_type.reference_source.ref_file.fields.path ) 24 #else:
25 #end if 25 #set $reference_fasta_filename = str( $analysis_type.format_type.reference_source.ref_file.fields.path )
26 #end if 26 #end if
27 #end if 27 #end if
28 28 #end if
29 ##finished setting up inputs 29 bamtools
30 30 #if str( $analysis_type.analysis_type_selector ) == "convert":
31 ##start bamtools commandline 31 convert
32 32 -format ${analysis_type.format_type.format_type_selector}
33 bamtools 33 #if str( $analysis_type.format_type.format_type_selector ) == "pileup":
34 34 ${analysis_type.format_type.mapqual}
35 #if str( $analysis_type.analysis_type_selector ) == "convert": 35 -fasta "${reference_fasta_filename}"
36 36 #elif str( $analysis_type.format_type.format_type_selector ) == "sam":
37 convert 37 ${analysis_type.format_type.noheader}
38 38 #end if
39 -format ${analysis_type.format_type.format_type_selector} 39 -out $out_file1
40 40 #elif str( $analysis_type.analysis_type_selector ) == "count":
41 #if str( $analysis_type.format_type.format_type_selector ) == "pileup": 41 count
42 42 > $out_file1
43 ${analysis_type.format_type.mapqual} 43 #elif str( $analysis_type.analysis_type_selector ) == "coverage":
44 -fasta "${reference_fasta_filename}" 44 coverage
45 45 -out $out_file1
46 #elif str( $analysis_type.format_type.format_type_selector ) == "sam": 46 #elif str( $analysis_type.analysis_type_selector ) == "header":
47 47 header
48 ${analysis_type.format_type.noheader} 48 > $out_file1
49 49 #elif str( $analysis_type.analysis_type_selector ) == "merge":
50 #end if 50 merge
51 51 -out $out_file1
52 -out $out_file1 52 #elif str( $analysis_type.analysis_type_selector ) == "random":
53 53 random
54 #elif str( $analysis_type.analysis_type_selector ) == "count": 54 -n ${analysis_type.count}
55 55 -seed ${analysis_type.seed}
56 count 56 -out $out_file1
57 > $out_file1 57 #elif str( $analysis_type.analysis_type_selector ) == "revert":
58 58 revert
59 #elif str( $analysis_type.analysis_type_selector ) == "coverage": 59 ${analysis_type.keepDuplicate}
60 60 ${analysis_type.keepQualities}
61 coverage 61 -out $out_file1
62 -out $out_file1 62 #elif str( $analysis_type.analysis_type_selector ) == "sort":
63 63 sort
64 #elif str( $analysis_type.analysis_type_selector ) == "header": 64 ${analysis_type.byname}
65 65 -out $out_file1
66 header 66 #end if
67 > $out_file1 67 #for $bam_count, $input_bam in enumerate( $input_bams ):
68 68 -in "localbam_${bam_count}.bam"
69 #elif str( $analysis_type.analysis_type_selector ) == "merge": 69 #end for
70 70 ]]>
71 merge 71 </command>
72 -out $out_file1 72 <inputs>
73 73 <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/>
74 #elif str( $analysis_type.analysis_type_selector ) == "random": 74 <conditional name="analysis_type">
75 75 <param name="analysis_type_selector" type="select" label="Select BAM manipulation" help="See help below for detailed description of each tool">
76 random 76 <option value="convert">Convert</option>
77 -n ${analysis_type.count} 77 <option value="count">Count</option>
78 -seed ${analysis_type.seed} 78 <option value="coverage">Coverage</option>
79 -out $out_file1 79 <option value="header">Header</option>
80 80 <option value="merge">Merge</option>
81 #elif str( $analysis_type.analysis_type_selector ) == "revert": 81 <option value="random">Random</option>
82 82 <option value="revert">Revert</option>
83 revert 83 <!-- The sort option below is commented out as BAM files in Galaxy are reference sorted by dafault. -->
84 ${analysis_type.keepDuplicate} 84 <!-- Allowing users for sort files may break donstream functionality. -->
85 ${analysis_type.keepQualities} 85 <!-- To enable sort option simply uncomment the line below: -->
86 -out $out_file1 86 <!-- <option value="sort">Sort</option> -->
87 87 </param>
88 #elif str( $analysis_type.analysis_type_selector ) == "sort": 88 <when value="convert">
89 89 <conditional name="format_type">
90 sort 90 <param name="format_type_selector" type="select" help="Select what to convert your BAM to">
91 ${analysis_type.byname} 91 <option value="bed">BED</option>
92 -out $out_file1 92 <option value="fasta">FASTA</option>
93 93 <option value="fastq">FASTQ</option>
94 #end if 94 <option value="json">JSON</option>
95 95 <option value="pileup">Pileup</option>
96 #for $bam_count, $input_bam in enumerate( $input_bams ): 96 <option value="sam">SAM</option>
97 -in "localbam_${bam_count}.bam" 97 <option value="yaml">YAML</option>
98 #end for 98 </param>
99 99 <when value="bed"/>
100 100 <when value="fasta"/>
101 </command> 101 <when value="fastq"/>
102 <inputs> 102 <when value="json"/>
103 103 <when value="yaml"/>
104 <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/> 104 <when value="pileup">
105 105 <conditional name="reference_source">
106 <conditional name="analysis_type"> 106 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
107 <param name="analysis_type_selector" type="select" label="Select BAM manipulation" help="See help below for detailed description of each tool"> 107 <option value="cached">Locally cached</option>
108 <option value="convert">Convert</option> 108 <option value="history">History</option>
109 <option value="count">Count</option> 109 </param>
110 <option value="coverage">Coverage</option> 110 <when value="cached">
111 <option value="header">Header</option> 111 <param name="ref_file" type="select" label="Using reference genome">
112 <option value="merge">Merge</option> 112 <options from_data_table="sam_fa_indexes">
113 <option value="random">Random</option> 113 <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>-->
114 <option value="revert">Revert</option> 114 </options>
115 <!-- The sort option below is commented out as BAM files in Galaxy are reference sorted by dafault. --> 115 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
116 <!-- Allowing users for sort files may break donstream functionality. --> 116 </param>
117 <!-- To enable sort option simply uncomment the line below: --> 117 </when>
118 <!-- <option value="sort">Sort</option> --> 118 <when value="history"> <!-- FIX ME!!!! -->
119 </param> 119 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
120 <when value="convert"> 120 </when>
121 <conditional name="format_type"> 121 </conditional>
122 <param name="format_type_selector" type="select" help="Select what to convert your BAM to"> 122 <param name="mapqual" type="boolean" truevalue="-mapqual" falsevalue="" label="Print quality scores?" />
123 <option value="bed">BED</option> 123 </when>
124 <option value="fasta">FASTA</option> 124 <when value="sam">
125 <option value="fastq">FASTQ</option> 125 <param name="noheader" type="boolean" truevalue="-noheader" falsevalue="" label="Do not print header" />
126 <option value="json">JSON</option> 126 </when>
127 <option value="pileup">Pileup</option> 127 </conditional>
128 <option value="sam">SAM</option> 128 </when>
129 <option value="yaml">YAML</option> 129 <when value="count" />
130 </param> 130 <when value="coverage" />
131 <when value="pileup"> 131 <when value="header" />
132 <conditional name="reference_source"> 132 <when value="merge" />
133 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> 133 <when value="random">
134 <option value="cached">Locally cached</option> 134 <param name="count" type="integer" value="10000" label="Number of random alignments to grab" help="No duplicate checking is perfomed" />
135 <option value="history">History</option> 135 <param name="seed" type="integer" value="1024" label="Random number generator seed" help="Use the same seed for reproducible results" />
136 </param> 136 </when>
137 <when value="cached"> 137 <when value="revert">
138 <param name="ref_file" type="select" label="Using reference genome"> 138 <param name="keepDuplicate" type="boolean" truevalue="-keepDuplicate" falsevalue="" label="Keep duplicates marked" help="Do not remove duplicate marks" />
139 <options from_data_table="sam_fa_indexes"> 139 <param name="keepQualities" type="boolean" truevalue="-keepQualities" falsevalue="" label="Keep base qualities" help="Do not replace qualities with contect of OQ tag" />
140 <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>--> 140 </when>
141 </options> 141 <!--
142 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> 142 <when value="sort">
143 </param> 143 <param name="byname" type="boolean" truevalue="-byname" falsevalue="" label="Sort by name" help="Checked: sort by name; Unchecked: sort by coordinate"/>
144 </when> 144 </when>
145 <when value="history"> <!-- FIX ME!!!! --> 145 -->
146 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
147 </when>
148 </conditional>
149 <param name="mapqual" type="boolean" truevalue="-mapqual" falsevalue="" label="Print quality scores?" />
150 </when>
151 <when value="sam">
152 <param name="noheader" type="boolean" truevalue="-noheader" falsevalue="" label="Do not print header" />
153 </when>
154 </conditional> 146 </conditional>
155 </when>
156 <when value="count">
157 <!-- Nothing to be done with count -> just count alignments in the input bam(s) -->
158 </when>
159 <when value="coverage">
160 <!-- Nothing to be done with count -> just count alignments in the input bam(s) -->
161 </when>
162 <when value="header">
163 <!-- Nothing to be done with count -> just count alignments in the input bam(s) -->
164 </when>
165 <when value="merge">
166 <!-- Nothing to be done with count -> just count alignments in the input bam(s) -->
167 </when>
168 <when value="random">
169 <param name="count" type="integer" value="10000" label="Number of random alignments to grab" help="No duplicate checking is perfomed" />
170 <param name="seed" type="integer" value="1024" label="Random number generator seed" help="Use the same seed for reproducible results" />
171 </when>
172 <when value="revert">
173 <param name="keepDuplicate" type="boolean" truevalue="-keepDuplicate" falsevalue="" label="Keep duplicates marked" help="Do not remove duplicate marks" />
174 <param name="keepQualities" type="boolean" truevalue="-keepQualities" falsevalue="" label="Keep base qualities" help="Do not replace qualities with contect of OQ tag" />
175 </when>
176 <when value="sort">
177 <param name="byname" type="boolean" truevalue="-byname" falsevalue="" label="Sort by name" help="Checked: sort by name; Unchecked: sort by coordinate"/>
178 </when>
179 </conditional>
180
181 </inputs> 147 </inputs>
182 <outputs> 148 <outputs>
183 <data format="txt" name="out_file1"> 149 <data format="txt" name="out_file1">
184 <change_format> 150 <change_format>
185 <when input="analysis_type.format_type.format_type_selector" value="bed" format="bed" /> 151 <when input="analysis_type.format_type.format_type_selector" value="bed" format="bed" />
186 <when input="analysis_type.format_type.format_type_selector" value="fasta" format="fasta" /> 152 <when input="analysis_type.format_type.format_type_selector" value="fasta" format="fasta" />
187 <when input="analysis_type.format_type.format_type_selector" value="fastq" format="fastq" /> 153 <when input="analysis_type.format_type.format_type_selector" value="fastq" format="fastq" />
188 <when input="analysis_type.format_type.format_type_selector" value="sam" format="sam" /> 154 <when input="analysis_type.format_type.format_type_selector" value="sam" format="sam" />
189 <when input="analysis_type.format_type.format_type_selector" value="pileup" format="pileup" /> 155 <when input="analysis_type.format_type.format_type_selector" value="pileup" format="pileup" />
190 <when input="analysis_type.analysis_type_selector" value="coverage" format="tabular" /> 156 <when input="analysis_type.analysis_type_selector" value="coverage" format="tabular" />
191 <when input="analysis_type.analysis_type_selector" value="merge" format="bam" /> 157 <when input="analysis_type.analysis_type_selector" value="merge" format="bam" />
192 <when input="analysis_type.analysis_type_selector" value="random" format="bam" /> 158 <when input="analysis_type.analysis_type_selector" value="random" format="bam" />
193 <when input="analysis_type.analysis_type_selector" value="revert" format="bam" /> 159 <when input="analysis_type.analysis_type_selector" value="revert" format="bam" />
194 <when input="analysis_type.analysis_type_selector" value="sort" format="bam" /> 160 <when input="analysis_type.analysis_type_selector" value="sort" format="bam" />
195 </change_format> 161 </change_format>
196 </data> 162 </data>
197 </outputs> 163 </outputs>
198 <tests> 164 <tests>
199 <test> 165 <test>
200 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> 166 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
201 <param name="analysis_type_selector" value="convert"/> 167 <param name="analysis_type_selector" value="convert"/>
202 <param name="format_type_selector" value="pileup"/> 168 <param name="format_type_selector" value="pileup"/>
203 <param name="reference_source_selector" value="history" /> 169 <param name="reference_source_selector" value="history" />
204 <param name="mapqual" value="true" /> 170 <param name="mapqual" value="true" />
205 <param name="ref_file" ftype="fasta" value="bamtools-fasta.fa"/> 171 <param name="ref_file" ftype="fasta" value="bamtools-fasta.fa"/>
206 <output name="output_bam" file="bamtools-convert-pileup.pu" /> 172 <output name="output_bam" file="bamtools-convert-pileup.pu" />
207 </test> 173 </test>
208 <test> 174 <test>
209 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> 175 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
210 <param name="analysis_type_selector" value="count"/> 176 <param name="analysis_type_selector" value="count"/>
211 <output name="output_bam" file="bamtools-count.tab" /> 177 <output name="output_bam" file="bamtools-count.tab" />
212 </test> 178 </test>
213 <test> 179 <test>
214 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> 180 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
215 <param name="analysis_type_selector" value="coverage"/> 181 <param name="analysis_type_selector" value="coverage"/>
216 <output name="output_bam" file="bamtools-coverage.tab" /> 182 <output name="output_bam" file="bamtools-coverage.tab" />
217 </test> 183 </test>
218 <test> 184 <test>
219 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> 185 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
220 <param name="analysis_type_selector" value="header"/> 186 <param name="analysis_type_selector" value="header"/>
221 <output name="output_bam" file="bamtools-header.txt" /> 187 <output name="output_bam" file="bamtools-header.txt" />
222 </test> 188 </test>
223 </tests> 189 </tests>
224 190 <help>
225 <stdio>
226 <exit_code range="1:" />
227 </stdio>
228
229 <help>
230 191
231 **What is does** 192 **What is does**
232 193
233 BAMTools is a collection of utilities for manipulation on BAM files. It is based on BAMtools suite of tools by Derek Barnett (https://github.com/pezmaster31/bamtools). 194 BAMTools is a collection of utilities for manipulation on BAM files. It is based on BAMtools suite of tools by Derek Barnett (https://github.com/pezmaster31/bamtools).
234 This Galaxy implementation of BAMTools utilities includes seven utilities - Convert, Count, Coverage, Header, Merge, Random, and Revert - decsribed in detail below. 195 This Galaxy implementation of BAMTools utilities includes seven utilities - Convert, Count, Coverage, Header, Merge, Random, and Revert - decsribed in detail below.
282 243
283 **More information** 244 **More information**
284 245
285 Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki 246 Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki
286 247
287 </help> 248 </help>
288 <citations> 249 <citations>
289 <citation type="doi">10.1093/bioinformatics/btr174</citation> 250 <citation type="doi">10.1093/bioinformatics/btr174</citation>
290 </citations> 251 </citations>
291 </tool> 252 </tool>