18
|
1 <tool id="alfa" name="ALFA" version="0.1.0">
|
|
2 <description>- Compute and display distribution of reads by genomic categories</description>
|
|
3
|
|
4 <!-- ALFA requires bedtools suite v2.20.0 and above -->
|
|
5 <requirements>
|
|
6 <requirement type="package" version="2.24">bedtools</requirement>
|
|
7 <requirement type="package" version="1.2">samtools</requirement>
|
|
8 <requirement type="package" version="1.4">matplotlib</requirement>
|
|
9 </requirements>
|
|
10
|
22
|
11 <command interpreter="python">
|
|
12 <![CDATA[
|
|
13 ALFA_wrapper.py
|
|
14
|
|
15 --project_name "${projectName}"
|
|
16
|
|
17 ##__INPUT 1__##
|
|
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__##
|
|
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 --galaxy_root $__root_dir__
|
|
63 --tool_dir $__tool_directory__
|
|
64 ]]>
|
|
65 </command>
|
18
|
66 <inputs>
|
|
67 <param name="projectName" value="ALFA" type="text" size="20" label="Project Name">
|
|
68 <validator type="empty_field" message="Please, specify a name for your project."/>
|
|
69 </param>
|
|
70
|
|
71 <section name="annotation" title="INPUT 1: Annotation File (GTF format)" expanded="True">
|
|
72 <conditional name="annotationSource">
|
|
73 <param name="annotationSourceSelection" type="select" label="Select the source of your annotated sequence/genome">
|
|
74 <option value="personal_gtf" selected="true">Personal annotation file (GTF format)</option>
|
|
75 <option value="index">Stranded and Unstranded Indexes previously generated by ALFA (Index format)</option>
|
|
76 <option value="built_in_index">Built-in indexes among a list of referenced genome (Index format)</option>
|
|
77 </param>
|
|
78 <when value="personal_gtf">
|
|
79 <param name="annotationFile" type="data" format="Gff, Gtf" label="Select your personal annotation file (GTF format)">
|
|
80 </param>
|
|
81 </when>
|
|
82 <when value="index">
|
22
|
83 <param name="strandedIndex" type="data" format="index" label="Select your ALFA Stranded index file (index format)"/>
|
18
|
84 <param name="unstrandedIndex" type="data" format="index" label="Select your ALFA Unstranded index file (index format)"/>
|
|
85 </when>
|
|
86 <when value="built_in_index">
|
|
87 <param name="built_in_index_prefix" type="select" label="Select Genome">
|
|
88 <options from_data_table="alfa_indexes">
|
|
89 <validator type="no_options" message="No indexes are available for the selected input dataset" />
|
|
90 </options>
|
|
91 </param>
|
|
92 </when>
|
|
93 </conditional>
|
|
94 </section>
|
|
95
|
|
96 <section name="reads" title="INPUT 2: Aligned Reads File(s) of the annotated sequence (BAM or BEDGRAPH format)" expanded="True">
|
|
97 <conditional name="readsType">
|
|
98 <param name="readsTypeSelection" type="select" label="Select the format of the reads file(s)">
|
|
99 <option value="bam" selected="true">BAM</option>
|
|
100 <option value="bedgraph">BEDGRAPH</option>
|
|
101 </param>
|
|
102 <when value="bam">
|
|
103 <repeat name="readsList" title="Reads File" min="1" >
|
|
104 <param name="readsFile" type="data" format="Bam" label="Select the reads file of your annotated sequence (BAM format)"/>
|
|
105 <param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>
|
|
106 </repeat>
|
|
107 </when>
|
|
108 <when value="bedgraph">
|
|
109 <repeat name="readsList" title="Reads File" min="1">
|
|
110 <param name="readsFile" type="data" format="Bed" label="Select the reads file of your annotated sequence (BEDGRAPH format)"/>
|
|
111 <param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>
|
|
112 </repeat>
|
|
113 </when>
|
|
114 </conditional>
|
|
115 <param name="strandness" type="select" label="Select the strandness of your mapped reads dataset">
|
|
116 <option value="unstranded" selected="true">Unstranded (reads will match genomic features on both forward and reverse strands of the annotated sequence)</option>
|
|
117 <option value="forward">Forward (reads will match only genomic features on the forward strand of the annotated sequence)</option>
|
|
118 <option value="reverse">Reverse (reads will match only genomic features on the reverse strand of the annotated sequence)</option>
|
|
119 </param>
|
|
120 </section>
|
|
121
|
|
122 <section name="outputFiles" title="OUTPUT FILES: Choose the output files" expanded="False">
|
|
123 <param name="plot" type="boolean" truevalue="True" falsevalue="False" checked="True" label="Categories and Biotypes Histograms" help="Plot the nucleotides distribution of the reads per genomic categories and biotypes"/>
|
|
124 <param name="countFile" type="boolean" truevalue="True" falsevalue="False" checked="True" label="Categories Count File" help="Edit the exact count of nucleotides in the reads per genomic categories and biotypes"/>
|
|
125 <param name="index" type="boolean" truevalue="True" falsevalue="False" checked="False" label ="Indexes" help="Print the resulting stranded and unstranded indexes from the gtf input file (useful if you plan to run ALFA again with this annotated sequence)"/>
|
|
126 </section>
|
|
127
|
22
|
128 <section name="outputOptions" title="ADVANCED SETTINGS" expanded="False">
|
18
|
129 <param name="categoriesDepth" type="select" label="Categories to Display">
|
|
130 <option value="1">gene | intergenic</option>
|
|
131 <option value="2">exon | intron | intergenic</option>
|
|
132 <option value="3" selected="true">5’-UTR | CDS | 3’-UTR | intron | intergenic</option>
|
|
133 <option value="4">5’-UTR | start_codon | CDS | stop_codon | 3’-UTR | intron | intergenic</option>
|
|
134 </param>
|
|
135 <param name="plotFormat" type="select" label="Plot Options: Select graph format" help="Ignore if you did not choose the histograms output file">
|
|
136 <option value="pdf" selected="true">pdf</option>
|
|
137 <option value="svg">svg</option>
|
|
138 <option value="png">png</option>
|
|
139 </param>
|
|
140 <conditional name="plotThreshold">
|
|
141 <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"/>
|
|
142 <when value="True">
|
|
143 <param name="yMin" type="float" value="-2.0" label="y min"/>
|
|
144 <param name="yMax" type="float" value="2.0" label="y max"/>
|
|
145 </when>
|
22
|
146 <when value="False"></when>
|
18
|
147 </conditional>
|
|
148 </section>
|
|
149 </inputs>
|
|
150
|
|
151 <outputs>
|
|
152 <data name="logReport" format="txt" label="${projectName}-Log Report"/>
|
|
153 <data name="outputPdf" format="pdf" label="${projectName}-BioFeatures Distribution">
|
|
154 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'pdf'</filter>
|
|
155 </data>
|
|
156 <data name="outputCategoriesPng" format="png" label="${projectName}-Categories Distribution">
|
|
157 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'png'</filter>
|
|
158 </data>
|
|
159 <data name="outputBiotypesPng" format="png" label="${projectName}-Biotypes Distribution">
|
|
160 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'png'</filter>
|
|
161 </data>
|
|
162 <data name="outputCategoriesSvg" format="svg" label="${projectName}-Categories Distribution">
|
|
163 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'svg'</filter>
|
|
164 </data>
|
|
165 <data name="outputBiotypesSvg" format="svg" label="${projectName}-Biotypes Distribution">
|
|
166 <filter>outputFiles['plot'] is True and outputOptions['plotFormat'] == 'svg'</filter>
|
|
167 </data>
|
|
168 <data name="outputCountFile" format="txt" label="${projectName}-Categories Count">
|
|
169 <filter>outputFiles['countFile'] is True</filter>
|
|
170 </data>
|
|
171 <data name="outputStrandedIndex" format="txt" label="${projectName}-Stranded Index">
|
|
172 <filter>outputFiles['index'] is True</filter>
|
|
173 </data>
|
|
174 <data name="outputUnstrandedIndex" format="txt" label="${projectName}-Unstranded Index">
|
|
175 <filter>outputFiles['index'] is True</filter>
|
|
176 </data>
|
|
177 </outputs>
|
|
178
|
|
179 <tests>
|
|
180 <test>
|
|
181 <param name="alfa_toy" />
|
|
182 <section name="annotation">
|
|
183 <conditional name="annotationSource">
|
|
184 <param name="annotationSourceSelection" value="personal_gtf" />
|
|
185 <param name="annotationFile" value="alfa_toy.gtf" ftype="gtf" />
|
|
186 </conditional>
|
|
187 </section>
|
|
188 <section name="reads">
|
|
189 <conditional name="readsType">
|
|
190 <param name="readsTypeSelection" value="bam" />
|
|
191 <repeat name="readsList">
|
|
192 <param name="readsFile" value="alfa_toy.bam" ftype="bam" />
|
|
193 <param name="readsLabel" value="alfa_toy" />
|
|
194 </repeat>
|
|
195 <param name="strandness" value="unstranded" />
|
|
196 </conditional>
|
|
197 </section>
|
|
198 <section name="outputFiles">
|
|
199 <param name="plot" value="True" />
|
|
200 <param name="countFile" value="True" />
|
|
201 <param name="index" value="True" />
|
|
202 </section>
|
|
203 <section name="outputOptions">
|
|
204 <param name="categoriesDepth" value="3" />
|
|
205 <param name="plotFormat" value="pdf" />
|
|
206 <conditional name="plotThreshold">
|
|
207 <param name="plotThresholdChoice" value="False" />
|
|
208 </conditional>
|
|
209 </section>
|
|
210 <output name="outputPdf" file="alfa_toy-Biofeatures Distribution.pdf" ftype="pdf" />
|
|
211 <output name="outputCountFile" file="alfa_toy.categories_count" ftype="txt" />
|
|
212 <output name="outputStrandedIndex" file="alfa_toy.stranded.index" ftype="txt" />
|
|
213 <output name="outputUnstrandedIndex" file="alfa_toy.unstranded.index" ftype="txt" />
|
|
214 <assert_stdout>
|
|
215 <has_text text="### End of the program" />
|
|
216 </assert_stdout>
|
|
217 </test>
|
|
218 </tests>
|
|
219
|
|
220 <help>
|
22
|
221 <![CDATA[
|
|
222 **What it does**
|
18
|
223
|
|
224
|
|
225 | ALFA provides a global overview of features distribution composing New Generation Sequencing dataset(s).
|
|
226 |
|
|
227 | 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.
|
|
228
|
|
229 ----
|
|
230
|
22
|
231 **ALFA acronym**
|
|
232
|
|
233 - Annotation.Landscape.For.Aligned reads
|
|
234
|
|
235 ----
|
|
236
|
18
|
237 **Official documentation of the tool**
|
|
238
|
|
239
|
|
240 - https://github.com/biocompibens/ALFA
|
|
241
|
|
242 ----
|
|
243
|
|
244 **Detailed example**
|
|
245
|
|
246 - https://github.com/biocompibens/ALFA#detailed-example
|
|
247
|
|
248 ----
|
|
249
|
|
250 **Nota Bene**
|
|
251
|
22
|
252 * **Input 1: Annotation File**
|
18
|
253
|
|
254
|
22
|
255 | 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.
|
|
256 | 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.
|
|
257 |
|
18
|
258
|
22
|
259 .. class:: warningmark
|
18
|
260
|
22
|
261 | Gtf File must be sorted.
|
|
262 |
|
18
|
263
|
22
|
264 .. class:: infomark
|
18
|
265
|
22
|
266 | 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.
|
|
267 |
|
18
|
268
|
22
|
269 .. class:: infomark
|
|
270
|
|
271 | ALFA also allows to use built-in indexes to save even more computational time. In order to generate these built-in indexes, install the data manager tool 'data_manager_build_alfa_indexes' available on the toolshed.
|
18
|
272
|
22
|
273 * **Input 2: Reads**
|
18
|
274
|
22
|
275 | 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.
|
|
276 | The strandness option determines which strand of the annotated sequence will be taken into account during this intersection.
|
|
277 |
|
18
|
278
|
22
|
279 .. class:: warningmark
|
18
|
280
|
22
|
281 | Bam or Bedgraph file(s) must be sorted.
|
|
282 |
|
18
|
283
|
22
|
284 .. class:: warningmark
|
18
|
285
|
22
|
286 | Chromosome names in reads and in annotation file (gtf or indexes) must be the same for the intersection to occur
|
|
287 |
|
18
|
288
|
22
|
289 * **Output files**
|
18
|
290
|
|
291 | 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.
|
|
292 | In the output files section, the user can choose what kind of files he desires as ALFA output. Categories Count File and Plots are proposed by default.
|
22
|
293 |
|
18
|
294
|
22
|
295 .. class:: infomark
|
18
|
296
|
22
|
297 | 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.*
|
|
298 |
|
18
|
299
|
22
|
300 - `How the plots look like`_
|
18
|
301
|
22
|
302 .. _How the plots look like: https://github.com/biocompibens/ALFA#plots
|
18
|
303
|
22
|
304 |
|
18
|
305
|
22
|
306 - `How they are generated`_
|
|
307
|
|
308 .. _How they are generated: https://github.com/biocompibens/ALFA#detailed-example
|
18
|
309
|
|
310 ----
|
|
311
|
|
312 **ALFA Developpers**
|
|
313
|
|
314 | Benoît Noël and Mathieu Bahin: *compbio team, Institut de Biologie de l'Ecole Normale Supérieure de Paris*
|
|
315
|
22
|
316 ]]>
|
18
|
317 </help>
|
|
318
|
|
319 <citations>
|
|
320 <citation type="bibtex">@MISC{
|
|
321 author="Benoît Noël and Mathieu Bahin"
|
|
322 title="ALFA: Annotation Landscape For Aligned reads"
|
|
323 crossref="https://github.com/biocompibens/ALFA"
|
|
324 institution="Institut de Biologie de l'Ecole Normale Supérieure de Paris"
|
|
325 }
|
|
326 </citation>
|
|
327 </citations>
|
|
328 </tool> |