comparison ALFA/ALFA.xml @ 32:b26aec436ab5 draft

Uploaded
author charles-bernard
date Thu, 21 Dec 2017 09:29:26 -0500
parents
children
comparison
equal deleted inserted replaced
31:7df7bee710ad 32:b26aec436ab5
1 <tool id="alfa" name="ALFA" version="0.1.0">
2 <description>- Plot the distribution of genomic features in your aligned reads </description>
3
4 <!-- ALFA requires bedtools suite v2.20.0 and above -->
5 <requirements>
6 <requirement type="package">bedtools</requirement>
7 <requirement type="package">samtools</requirement>
8 <requirement type="package">matplotlib</requirement>
9 </requirements>
10
11 <command interpreter="python">
12 <![CDATA[
13 ALFA_wrapper.py
14
15 --project_name "${projectName}"
16
17 ##__INPUT 1: ANNOTATION OF THE SEQ/GENOME__##
18 #if str ( $annotation.annotationSource['annotationSourceSelection'] ) == "index"
19 --index "$annotation.annotationSource['strandedIndex']" "$annotation.annotationSource['unstrandedIndex']"
20 #else if str ( $annotation.annotationSource['annotationSourceSelection'] ) == "built_in_index"
21 --bi_index "$annotation.annotationSource.built_in_index_prefix.fields.prefix"
22 #else
23 --annotation "$annotation.annotationSource['annotationFile']"
24 #end if
25
26 ##__INPUT 2: ALIGNED READS__##
27 --reads_format $reads.readsType['readsTypeSelection']
28 --reads
29 #for $i, $r in enumerate ( $reads.readsType['readsList'] )
30 "__fname__$r.readsFile"
31 "__label__$r.readsLabel"
32 #end for
33 --strandness $reads['strandness']
34
35 ##__OUTPUT FILES__##
36 #if str ( $outputFiles['plot'] ) == "True"
37 #if str ( $outputOptions['plotFormat'] ) == "pdf"
38 --output_pdf "$outputPdf"
39 #else if str ( $outputOptions['plotFormat'] ) == "png"
40 --output_png "$outputCategoriesPng" "$outputBiotypesPng"
41 #else
42 --output_svg "$outputCategoriesSvg" "$outputBiotypesSvg"
43 #end if
44 #end if
45 #if str ( $outputFiles['countFile'] ) == "True"
46 --output_count "$outputCountFile"
47 #end if
48 #if str ( $outputFiles['index'] ) == "True"
49 --output_index "$outputStrandedIndex" "$outputUnstrandedIndex"
50 #end if
51
52 ##__OUTPUT OPTIONS__##
53 --categories_depth $outputOptions['categoriesDepth']
54 #if str ( $outputFiles['plot'] ) == "True"
55 --plot_format $outputOptions['plotFormat']
56 #if str ( $outputOptions.plotThreshold['plotThresholdChoice'] ) == "True"
57 --threshold $outputOptions.plotThreshold.yMin $outputOptions.plotThreshold.yMax
58 #end if
59 #end if
60
61 --log_report "$logReport"
62 --tool_dir "$__tool_directory__"
63 ]]>
64 </command>
65 <inputs>
66 <param name="projectName" value="ALFA" type="text" size="20" label="Project Name">
67 <validator type="empty_field" message="Please, specify a name for your project."/>
68 </param>
69
70 <section name="annotation" title="INPUT 1: Annotation of your genome / sequence" expanded="True">
71 <conditional name="annotationSource">
72 <param name="annotationSourceSelection" type="select" label="Select the type of your annotation">
73 <option value="personal_gtf" selected="true">Personal annotation file (GTF format)</option>
74 <option value="index">Stranded and Unstranded Indexes previously generated by ALFA (Index format)</option>
75 <option value="built_in_index">Built-in indexes among a list of referenced genome (Index format)</option>
76 </param>
77 <when value="personal_gtf">
78 <param name="annotationFile" type="data" format="Gff, Gtf" label="Select your personal annotation file (GTF format)">
79 </param>
80 </when>
81 <when value="index">
82 <param name="strandedIndex" type="data" format="index" label="Select your ALFA Stranded index file (index format)"/>
83 <param name="unstrandedIndex" type="data" format="index" label="Select your ALFA Unstranded index file (index format)"/>
84 </when>
85 <when value="built_in_index">
86 <param name="built_in_index_prefix" type="select" label="Select Genome">
87 <options from_data_table="alfa_indexes">
88 <validator type="no_options" message="No indexes are available for the selected input dataset. Ask your Galaxy Admin for to use ALFA_data_manager tool to build such indexes!" />
89 </options>
90 </param>
91 </when>
92 </conditional>
93 </section>
94
95 <section name="reads" title="INPUT 2: Mapped reads" expanded="True">
96 <conditional name="readsType">
97 <param name="readsTypeSelection" type="select" label="Select the format of your mapped reads">
98 <option value="bam" selected="true">BAM</option>
99 <option value="bedgraph">BEDGRAPH</option>
100 </param>
101 <when value="bam">
102 <repeat name="readsList" title="Mapped Reads" min="1" >
103 <param name="readsFile" type="data" format="Bam" label="Select the file (BAM format)"/>
104 <param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>
105 </repeat>
106 </when>
107 <when value="bedgraph">
108 <repeat name="readsList" title="Mapped Reads" min="1">
109 <param name="readsFile" type="data" format="Bed" label="Select the file (BEDGRAPH format)"/>
110 <param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>
111 </repeat>
112 </when>
113 </conditional>
114 <param name="strandness" type="select" label="Select the strandness of your library of reads">
115 <option value="unstranded" selected="true">Unstranded (reads will be intersected with both forward and reverse strands of the annotated sequence)</option>
116 <option value="forward">Forward (reads will be intersected with only the the forward strand of the annotated sequence)</option>
117 <option value="reverse">Reverse (reads will will be intersected only with the reverse strand of the annotated sequence)</option>
118 </param>
119 </section>
120
121 <section name="outputFiles" title="OUTPUT FILES: Choose the output files" expanded="False">
122 <param name="plot" type="boolean" truevalue="True" falsevalue="False" checked="True" label="Categories and Biotypes Histograms" help="Plot the distribution of genomic categories and biotypes captured by your reads"/>
123 <param name="countFile" type="boolean" truevalue="True" falsevalue="False" checked="True" label="Categories Count File" help="Return the exact count of nucleotides per genomic categories and biotypes"/>
124 <param name="index" type="boolean" truevalue="True" falsevalue="False" checked="False" label ="Indexes" help="Return the stranded and unstranded ALFA indexes generated from the GTF input file (useful if you plan to run ALFA again with the same annotated sequence)"/>
125 </section>
126
127 <section name="outputOptions" title="ADVANCED SETTINGS" expanded="False">
128 <param name="categoriesDepth" type="select" label="Categories to Display">
129 <option value="1">gene | intergenic | antisense</option>
130 <option value="2">exon | intron | undescribed genes | intergenic | antisense</option>
131 <option value="3" selected="true">5’-UTR | CDS | 3’-UTR | underscribes exons | intron | undescribed genes | intergenic | antisense</option>
132 <option value="4">5’-UTR | start_codon | CDS | undescribed CDS | stop_codon | 3’-UTR | undescribed exons | intron | undescribed genes | intergenic | antisense</option>
133 </param>
134 <param name="plotFormat" type="select" label="Plot Options: Select graph format" help="Ignore if you did not choose the histograms output file">
135 <option value="pdf" selected="true">pdf</option>
136 <option value="svg">svg</option>
137 <option value="png">png</option>
138 </param>
139 <conditional name="plotThreshold">
140 <param name="plotThresholdChoice" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Plot Options: Modify y axis range of the normalized counts of bio-features" help="Ignore if you did not choose the histograms output file"/>
141 <when value="True">
142 <param name="yMin" type="float" value="-2.0" label="y min"/>
143 <param name="yMax" type="float" value="2.0" label="y max"/>
144 </when>
145 <when value="False"></when>
146 </conditional>
147 </section>
148 </inputs>
149
150 <outputs>
151 <data name="logReport" format="txt" label="${projectName}-Log Report"/>
152 <data name="outputPdf" format="pdf" label="${projectName}-BioFeatures Distribution">
153 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'pdf'</filter>
154 </data>
155 <data name="outputCategoriesPng" format="png" label="${projectName}-Categories Distribution">
156 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'png'</filter>
157 </data>
158 <data name="outputBiotypesPng" format="png" label="${projectName}-Biotypes Distribution">
159 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'png'</filter>
160 </data>
161 <data name="outputCategoriesSvg" format="svg" label="${projectName}-Categories Distribution">
162 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'svg'</filter>
163 </data>
164 <data name="outputBiotypesSvg" format="svg" label="${projectName}-Biotypes Distribution">
165 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'svg'</filter>
166 </data>
167 <data name="outputCountFile" format="txt" label="${projectName}-Categories Count">
168 <filter>outputFiles['countFile'] is True</filter>
169 </data>
170 <data name="outputStrandedIndex" format="txt" label="${projectName}-Stranded Index">
171 <filter>outputFiles['index'] is True</filter>
172 </data>
173 <data name="outputUnstrandedIndex" format="txt" label="${projectName}-Unstranded Index">
174 <filter>outputFiles['index'] is True</filter>
175 </data>
176 </outputs>
177
178 <tests>
179 <test>
180 <param name="alfa_toy" />
181 <section name="annotation">
182 <conditional name="annotationSource">
183 <param name="annotationSourceSelection" value="personal_gtf" />
184 <param name="annotationFile" value="alfa_toy.gtf" ftype="gtf" />
185 </conditional>
186 </section>
187 <section name="reads">
188 <conditional name="readsType">
189 <param name="readsTypeSelection" value="bam" />
190 <repeat name="readsList">
191 <param name="readsFile" value="alfa_toy.bam" ftype="bam" />
192 <param name="readsLabel" value="alfa_toy" />
193 </repeat>
194 <param name="strandness" value="unstranded" />
195 </conditional>
196 </section>
197 <section name="outputFiles">
198 <param name="plot" value="True" />
199 <param name="countFile" value="True" />
200 <param name="index" value="True" />
201 </section>
202 <section name="outputOptions">
203 <param name="categoriesDepth" value="3" />
204 <param name="plotFormat" value="pdf" />
205 <conditional name="plotThreshold">
206 <param name="plotThresholdChoice" value="False" />
207 </conditional>
208 </section>
209 <output name="outputPdf" file="alfa_toy-Biofeatures Distribution.pdf" ftype="pdf" />
210 <output name="outputCountFile" file="alfa_toy.categories_count" ftype="txt" />
211 <output name="outputStrandedIndex" file="alfa_toy.stranded.index" ftype="txt" />
212 <output name="outputUnstrandedIndex" file="alfa_toy.unstranded.index" ftype="txt" />
213 <assert_stdout>
214 <has_text text="### End of the program" />
215 </assert_stdout>
216 </test>
217 </tests>
218
219 <help>
220 <![CDATA[
221 **What it does**
222
223
224 | ALFA provides a global overview of features distribution composing New Generation Sequencing dataset(s).
225 |
226 | Given a set of aligned reads (BAM files) and an annotation file (GTF format), the tool produces plots of the raw and normalized distributions of those reads among genomic categories (stop codon, 5'-UTR, CDS, intergenic, etc.) and biotypes (protein coding genes, miRNA, tRNA, etc.). Whatever the sequencing technique, whatever the organism.
227
228 ----
229
230 **ALFA acronym**
231
232 - Annotation Landscape For Aligned reads
233
234 ----
235
236 **Official documentation of the tool**
237
238
239 - https://github.com/biocompibens/ALFA
240
241 ----
242
243 **Detailed example**
244
245 - https://github.com/biocompibens/ALFA#detailed-example
246
247 ----
248
249 **Nota Bene**
250
251 * **Input 1: Annotation File**
252
253
254 | ALFA requires as first input an annotation file (sequence, genome...) in gtf format in order to generate alfa indexes needed in a second round of the program.
255 | Indexes are files which list all the coordinates of the categories (stop codon, 5'-UTR, CDS, intergenic...) and biotypes (protein coding genes, miRNA, tRNA, ...) encountered in the annotated sequence.
256 |
257
258 .. class:: warningmark
259
260 | Gtf File must be sorted.
261 |
262
263 .. class:: infomark
264
265 | Generation of indexes from an annotation file might be time consuming (i.e ~10min for the human genome). Thus, ALFA allows the user to submit directly indexes generated in previous runs as inputs for a new run.
266 |
267
268 .. class:: infomark
269
270 | ALFA also enables the use of built-in indexes to save even more computational time. In order to generate easily these built-in indexes, install the data manager tool `ALFA_data_manager`_ available on the toolshed.
271
272 .. _data_manager_build_alfa_indexes: https://toolshed.g2.bx.psu.edu/view/charles-bernard/data_manager_build_alfa_indexes
273
274 * **Input 2: Reads**
275
276 | ALFA requires as second input a single or a set of mapped reads file(s) in either bam or bedgraph format. The coordinates of the mapped reads will be intersected with the according categories and biotypes mentioned in the indexes.
277 | The strandness option determines which strand of the annotated sequence will be taken into account during this intersection.
278 |
279
280 .. class:: warningmark
281
282 | Bam or Bedgraph file(s) must be sorted.
283 |
284
285 .. class:: warningmark
286
287 | Chromosome names in reads and in annotation file (gtf or indexes) must be the same for the intersection to occur
288 |
289
290 * **Output files**
291
292 | The result of the intersection is a count file displaying the count of nucleotides in the reads for each genomic categories and biotypes. From this count file, plots of the raw and normalized distributions of the reads among these categories are generated.
293 | In the output files section, the user can choose what kind of files he/she desires as ALFA output. Categories Count File and Plots are proposed by default.
294 |
295
296 .. class:: infomark
297
298 | The user can also select the 'indexes' option as output. This option is interesting if you plan to run ALFA again with the same submitted annotation file. *See Nota Bene/Input 1: Annotation File for more information.*
299 |
300
301 - `How the plots look like`_
302
303 .. _How the plots look like: https://github.com/biocompibens/ALFA#plots
304
305 |
306
307 - `How they are generated`_
308
309 .. _How they are generated: https://github.com/biocompibens/ALFA#detailed-example
310
311 ----
312
313 **ALFA Developpers**
314
315 | Benoît Noël and Mathieu Bahin: *compbio team, Institut de Biologie de l'Ecole Normale Supérieure de Paris*
316
317 ]]>
318 </help>
319
320 <citations>
321 <citation type="bibtex">@MISC{
322 author="Benoît Noël and Mathieu Bahin"
323 title="ALFA: Annotation Landscape For Aligned reads"
324 crossref="https://github.com/biocompibens/ALFA"
325 institution="Institut de Biologie de l'Ecole Normale Supérieure de Paris"
326 }
327 </citation>
328 </citations>
329 </tool>