comparison sRbowtie.xml @ 0:de9cd3998571 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sr_bowtie commit 19d31884000f86a5e5e07cd98ecd29fe6c9b1a7e
author artbio
date Sat, 02 Sep 2017 10:52:05 -0400
parents
children 5f4fbba31b6a
comparison
equal deleted inserted replaced
-1:000000000000 0:de9cd3998571
1 <tool id="bowtieForSmallRNA" name="sR_bowtie" version="2.0.0">
2 <description>for small RNA short reads</description>
3 <requirements>
4 <requirement type="package" version="1.1.2=py27_2">bowtie</requirement>
5 <requirement type="package" version="1.2">samtools</requirement>
6 </requirements>
7 <command detect_errors="exit_code"><![CDATA[
8 #if $refGenomeSource.genomeSource == "history":
9 bowtie-build -f $refGenomeSource.ownFile genome &&
10 ln -s -f '$refGenomeSource.ownFile' genome.fa &&
11 #set index_path = 'genome'
12 #else:
13 #set index_path = $refGenomeSource.index.fields.path
14 #end if
15 #if $input.extension == "fasta":
16 #set format = "-f"
17 #elif $input.extension == "fastq":
18 #set format = "-q"
19 #end if
20
21 ## set the method_prefix
22 #if $method == "RNA":
23 #set method_prefix = "-v %s -M 1 --best --strata --norc" % str($v_mismatches)
24 #elif $method == "unique":
25 #set method_prefix = "-v %s -m 1" % str($v_mismatches)
26 #elif $method == "multiple":
27 #set method_prefix = "-v %s -M 1 --best --strata" % str($v_mismatches)
28 #elif $method == "k_option":
29 #set method_prefix = "-v %s -k 1 --best" % str($v_mismatches)
30 #elif $method == "n_option":
31 #set method_prefix = "-n %s -M 1 --best" % str($v_mismatches)
32 #elif $method == "a_option":
33 #set method_prefix = "-v %s -a --best" % str($v_mismatches)
34 #end if
35
36 ## set the extra_output
37 #if $additional_fasta == "No":
38 #set extra_output = ""
39 #elif $additional_fasta == "al":
40 #set extra_output = " --al %s " % str($aligned)
41 #elif $additional_fasta == "unal":
42 #set extra_output = " --un %s " % str($unaligned)
43 #else:
44 #set extra_output = " --al %s --un %s " % (str($aligned), str($unaligned))
45 #end if
46
47 #set $method_postfix = " %s %s " % ($method_prefix, $extra_output)
48
49 ## run the bowtie alignement
50 #if $output_format == "tabular":
51 bowtie -p \${GALAXY_SLOTS:-4} $method_postfix --suppress 6,7,8 $index_path $format '$input' > $output
52 #elif $output_format == "sam":
53 bowtie -p \${GALAXY_SLOTS:-4} $method_postfix -S $index_path $format '$input' > '$output'
54 #elif $output_format == "bam":
55 bowtie -p \${GALAXY_SLOTS:-4} $method_postfix -S $index_path $format '$input' | samtools view -u - | samtools sort -@ "\${GALAXY_SLOTS:-4}" -T tmp -O bam -o $output
56 #end if
57 ##### | samtools view -uS
58 ]]></command>
59 <inputs>
60 <param format="fasta, fastq" help="Only with clipped, fasta or fastq read files" label="Input fasta or fastq file: reads clipped from their adapter" name="input" type="data" />
61 <param help="bowtie parameters adjusted to the type of matching. RNA option match to only one strand" label="What kind of matching do you want to do?" name="method" type="select">
62 <option value="RNA">Match on sense strand RNA reference index, multiple mappers randomly matched at a single position</option>
63 <option value="unique">Match unique mappers on DNA reference index</option>
64 <option selected="true" value="multiple">Match on DNA, multiple mappers randomly matched at a single position</option>
65 <option value="k_option">Match on DNA as fast as possible, without taking care of mapping issues (for raw annotation of reads)</option>
66 <option value="n_option">Match on DNA - RNAseq mode (-n bowtie option)</option>
67 <option value="a_option">Match and report all valid alignments</option>
68 </param>
69 <param help="specify the -v bowtie option" label="Number of mismatches allowed" name="v_mismatches" type="select">
70 <option value="0">0</option>
71 <option selected="true" value="1">1</option>
72 <option value="2">2</option>
73 <option value="3">3</option>
74 </param>
75 <conditional name="refGenomeSource">
76 <param help="Built-ins were indexed using default options" label="Will you select a reference genome from your history or use a built-in index?" name="genomeSource" type="select">
77 <option value="indexed">Use a built-in index</option>
78 <option value="history">Use one from the history</option>
79 </param>
80 <when value="indexed">
81 <param help="if your genome of interest is not listed - contact instance administrator" label="Select a DNA reference index" name="index" type="select">
82 <options from_data_table="bowtie_indexes">
83
84 </options>
85 </param>
86 </when>
87 <when value="history">
88 <param format="fasta" label="Select a fasta file, to serve as index reference" name="ownFile" type="data" />
89 </when>
90 </conditional>
91 <param help="Note that the BAM will be viewable in trackster only if you choose a full genome referenced for Trackster usage. see the doc below" label="Select output format" name="output_format" type="select">
92 <option selected="true" value="tabular">tabular</option>
93 <option value="sam">sam</option>
94 <option value="bam">bam</option>
95 </param>
96 <param help="to get aligned and unaligned reads in fasta format" label="additional fasta output" name="additional_fasta" type="select">
97 <option selected="true" value="No">No</option>
98 <option value="al">aligned</option>
99 <option value="unal">unaligned</option>
100 <option value="al_and_unal">both aligned and unaligned</option>
101 </param>
102 </inputs>
103 <outputs>
104 <data format="tabular" label="Bowtie Output" name="output">
105 <change_format>
106 <when format="sam" input="output_format" value="sam" />
107 <when format="bam" input="output_format" value="bam" />
108 </change_format>
109 <actions>
110 <conditional name="refGenomeSource.genomeSource">
111 <when value="indexed">
112 <action name="dbkey" type="metadata">
113 <option column="1" name="bowtie_indexes" offset="0" type="from_data_table">
114 <filter column="0" compare="startswith" keep="False" type="param_value" value="#" />
115 <filter column="0" ref="refGenomeSource.index" type="param_value" />
116 </option>
117 </action>
118 </when>
119 <when value="history">
120 <action name="dbkey" type="metadata">
121 <option name="refGenomeSource.ownFile" param_attribute="dbkey" type="from_param" />
122 </action>
123 </when>
124 </conditional>
125 </actions>
126 </data>
127 <data format="fasta" label="Matched reads" name="aligned">
128 <filter>additional_fasta == "al" or additional_fasta == "al_and_unal"</filter>
129 </data>
130 <data format="fasta" label="Unmatched reads" name="unaligned">
131 <filter>additional_fasta == "unal" or additional_fasta == "al_and_unal"</filter>
132 </data>
133 </outputs>
134 <tests>
135 <test>
136 <param name="genomeSource" value="history" />
137 <param ftype="fasta" name="ownFile" value="297_reference.fa" />
138 <param name="method" value="unique" />
139 <param ftype="fasta" name="input" value="input.fa" />
140 <param name="v_mismatches" value="1" />
141 <param name="output_format" value="bam" />
142 <output file="output.bam" ftype="bam" compare="sim_size" delta="1000" name="output" />
143 </test>
144 <test>
145 <param name="genomeSource" value="history" />
146 <param ftype="fasta" name="ownFile" value="297_reference.fa" />
147 <param name="method" value="unique" />
148 <param ftype="fastq" name="input" value="input.fastq" />
149 <param name="v_mismatches" value="1" />
150 <param name="output_format" value="bam" />
151 <output file="output2.bam" ftype="bam" compare="sim_size" delta="1000" name="output" />
152 </test>
153 <test>
154 <param name="genomeSource" value="history" />
155 <param ftype="fasta" name="ownFile" value="297_reference.fa" />
156 <param name="method" value="multiple" />
157 <param ftype="fasta" name="input" value="input.fa" />
158 <param name="v_mismatches" value="1" />
159 <param name="output_format" value="tabular" />
160 <output file="output.tab" ftype="tabular" name="output" />
161 </test>
162 <test>
163 <param name="genomeSource" value="history" />
164 <param ftype="fasta" name="ownFile" value="297_reference.fa" />
165 <param name="method" value="multiple" />
166 <param ftype="fasta" name="input" value="input.fa" />
167 <param name="v_mismatches" value="1" />
168 <param name="additional_fasta" value="al" />
169 <param name="output_format" value="tabular" />
170 <output file="output.tab" ftype="tabular" name="output" />
171 <output file="al.fa" ftype="fasta" name="aligned" />
172 </test>
173 </tests>
174 <help>
175
176 **What it does**
177
178 Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. It is developed by Ben Langmead and Cole Trapnell. Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
179
180 .. _Bowtie: http://bowtie-bio.sourceforge.net/index.shtml
181
182 A generic "Map with Bowtie for Illumina" Galaxy tool is available in the main Galaxy distribution.
183
184 However, this Bowtie wrapper tool only takes FASTQ files as inputs.
185
186 The sRbowtie wrapper works with short (-v bowtie mode) reads inputs, in fasta or fastq format, and proposes a simplified set of configurations suited to small RNA analysis.
187
188 ------
189
190 **OPTIONS**
191
192 .. class:: infomark
193
194 This script uses Bowtie to match reads on a reference index.
195
196 Depending on the type of matching, different bowtie options are used:
197
198 **Match on sense strand RNA reference index, multiple mappers randomly matched at a single position**
199
200 Align on RNA reference, SENSE strand, randomly attributing multiple mapper to target with least mismatches:
201
202 *-v [0,1,2,3] -M 1 --best --strata -p 12 --norc*
203
204 **Match unique mappers on DNA reference index**
205
206 Align ONLY unique mappers on DNA reference index
207
208 *-v [0,1,2,3] -m 1 -p 12*
209
210 Note that using this option with -v values other than 0 is questionnable...
211
212 **Match on DNA, multiple mappers randomly matched at a single position**
213
214 Align multiple mappers, randomly attributing multiple mapper to target with least mismatches, number of mismatch allowed specified by -v option:
215
216 *-v [0,1,2,3] -M 1 --best --strata -p 12*
217
218 **Match on DNA as fast as possible, without taking care of mapping issues (for raw annotation of reads)**
219
220 Align with highest speed, not guaranteeing best hit for speed gain:
221
222 *-v [0,1,2,3] -k 1 --best -p 12*
223
224 **Match on DNA - RNAseq mode (-n bowtie option)**
225
226 Align reads in as for RNAseq data alignment
227
228 *-n [0,1,2,3] -M 1 --best -p 12*
229
230 **Match and report all valid alignments**
231
232 Align reads and report all valid alignments
233
234 *-v [0,1,2,3] -a --best -p 12*
235
236
237
238 -----
239
240 **Input formats**
241
242 .. class:: warningmark
243
244 *Lists of reads, in fasta or fastq format, clipped from their adapter sequence*
245
246 -----
247
248 **OUTPUTS**
249
250 If you choose tabular as the output format, you will obtain the matched reads in tabular bowtie output format (--suppress 6,7,8), having the following columns::
251
252 Column Description
253 -------- --------------------------------------------------------
254 1 FastaID fasta identifier
255 2 polarity + or - depending whether the match was reported on the forward or reverse strand
256 3 target name of the matched target
257 4 Offset O-based coordinate of the miR on the miRBase pre-miR sequence
258 5 Seq sequence of the matched Read
259
260 If you choose SAM, you will get the output in unordered SAM format.
261
262 .. class:: warningmark
263
264 if you choose BAM, the output will be in sorted BAM format.
265 To be viewable in Trackster, several condition must be fulfilled:
266
267 .. class:: infomark
268
269 Reads must have been matched to a genome whose chromosome names are compatible with Trackster genome indexes
270
271 .. class:: infomark
272
273 the database/Build (dbkey) which is indicated for the dataset (Pencil - Database/Build field) must match a Trackster genome index.
274
275 Please contact the Galaxy instance administrator if your genome is not referenced
276
277 **Matched and unmatched fasta reads can be retrieved, for further analyses**
278
279 </help>
280 <citations>
281 <citation type="doi">10.1186/gb-2009-10-3-r25</citation>
282 </citations>
283 </tool>