-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCLIFinder.xml
317 lines (304 loc) · 16.2 KB
/
CLIFinder.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<tool name="CLIFinder" id="CLIFinder" version="0.5.2" profile="16.01">
<description>Find chimerics transcripts containing LINEs sequences</description>
<macros>
<xml name="source_bwa" token_arg="Argument" token_build="Build argument" token_ref="">
<conditional name="source">
<param name="source" type="select" label="Will you select the reference database from your history or use a built-in index?">
<option value="indexed">Use a built-in index</option>
<option value="history">Use one from the history</option>
</param>
<when value="indexed">
<param name="indices" argument="@ARG@" type="select" label="Select @REF@">
<options from_data_table="bwa_mem_indexes">
<filter type="sort_by" column="2" />
<validator type="no_options" message="No indexes are available" />
</options>
</param>
</when>
<when value="history">
<param name="file" argument="@ARG@" type="data" format="fasta" label="Select @REF@ from history" help="We will also use @BUILD@"/>
</when>
</conditional>
</xml>
<xml name="source_blast" token_arg="Argument" token_build="Build argument" token_ref="">
<conditional name="source">
<param name="source" type="select" label="Will you select the reference database from your history or use a built-in index?">
<option value="indexed">Use a built-in index</option>
<option value="history">Generate one from the history</option>
<option value="url">Download one from some URL</option>
</param>
<when value="indexed">
<param name="indices" argument="@ARG@" type="select" label="Select @REF@">
<options from_data_table="blastdb">
<filter type="sort_by" column="2" />
<validator type="no_options" message="No indexes are available" />
</options>
</param>
</when>
<when value="history">
<param name="file" argument="@ARG@" type="data" format="fasta" label="Select @REF@ from history" help="We will also use @BUILD@"/>
</when>
<when value="url">
<param name="file" argument="@ARG@" type="text" label="Download @REF@ from URL" help="We will not use @BUILD@: please provide link to tar.gz"/>
</when>
</conditional>
</xml>
</macros>
<requirements>
<requirement type="package" version="1.3">seqtk</requirement>
<requirement type="package" version="1.9">samtools</requirement>
<requirement type="package" version="2.26.0gx">bedtools</requirement>
<requirement type="package" version="4.0.9_p2">repeatmasker</requirement>
<requirement type="package" version="0.7.17">bwa</requirement>
<requirement type="package" version="0.0.14">fastx_toolkit</requirement>
<requirement type="package" version="1.20.1">wget</requirement>
<requirement type="package" version="5.26.2">perl</requirement>
<requirement type="package" version="2.50">perl-getopt-long</requirement>
<requirement type="package" version="0.45">perl-file-copy-recursive</requirement>
<requirement type="package" version="2.02">perl-parallel-forkmanager</requirement>
<requirement type="package" version="0.34">perl-statistics-r</requirement>
<requirement type="package" version="3.5.1">r-base</requirement>
<requirement type="package" version="1.8.5">r-plyr</requirement>
<requirement type="package" version="1.34.0">bioconductor-genomicranges</requirement>
</requirements>
<version_command>perl '$__tool_directory__/script/CLIFinder.pl' --version | head -n 1 | grep 'version' | cut -d ' ' -f 3</version_command>
<command detect_errors="aggressive"><![CDATA[
perl '$__tool_directory__/script/CLIFinder.pl'
#if str($inputs.type) == 'paired_collection'
#for $x in $inputs.fastq
--first '$x.forward'
--name '$x.name'
--second '$x.reverse'
#end for
#else
#if str($inputs.datasets.custom_name) == 'true'
#for $x in $inputs.datasets.fastq
--first '$x.first'
--name '$x.name'
--second '$x.second'
#end for
#else
#for $x in $inputs.datasets.fastq
--first '$x.first'
--name '$x.first.name'
--second '$x.second'
#end for
#end if
#end if
#if $genome.source.source == "history"
--ref '$genome.source.file'
--build_ref
#else
--ref '$genome.source.indices.fields.path'
#end if
#if $te.source.source == "history"
--TE '$te.source.file'
--build_TE
#else
--TE '$te.source.indices.fields.path'
#end if
#if str($rnadb.blast.run) == 'true'
#if $rnadb.blast.source.source == "indexed"
--rnadb '$rnadb.blast.source.indices.fields.path'
#else
--rnadb '$rnadb.blast.source.file'
#end if
#if $rnadb.blast.source.source == "history"
--build_rnadb
#end if
#end if
#if str($estdb.blast.run) == 'true'
#if $estdb.blast.source.source == "indexed"
--estdb '$estdb.blast.source.indices.fields.path'
#else
--estdb '$estdb.blast.source.file'
#end if
#if $estdb.blast.source.source == "history"
--build_estdb
#end if
#end if
#if str($species) != ''
--species '$species'
#end if
--rmsk '$rmsk'
--refseq '$refseq'
--html '$chimerae'
--html_path '${chimerae.files_path}'
--size_insert '$size_insert'
--size_read '$size'
--min_unique '$min_unique'
--BDir '$BDir'
--min_L1 '$min_L1'
--mis_L1 '$mis_L1'
--threads "\${GALAXY_SLOTS:-4}"
]]>
</command>
<inputs>
<conditional name="inputs">
<param name="type" type="select" label="Input Type">
<option value="datasets" selected="true">Distinct datasets</option>
<option value="paired_collection">Paired collection</option>
</param>
<when value="datasets">
<conditional name="datasets">
<param name="custom_name" type="select" label="Use custom name for the input sequence files?">
<option value="true">Yes</option>
<option value="false" selected="true">No: the names will be extracted automatically</option>
</param>
<when value="true">
<repeat name="fastq" title="Input sequences" min="1">
<param argument="--first" type="data" format="fastqsanger" label="First set of paired-end reads"/>
<param argument="--name" type="text" value="" label="Label for the input sequences"/>
<param argument="--second" type="data" format="fastqsanger" label="Second set of paired-end reads"/>
</repeat>
</when>
<when value="false">
<repeat name="fastq" title="Input sequences" min="1">
<param argument="--first" type="data" format="fastqsanger" label="First set of paired-end reads"/>
<param argument="--second" type="data" format="fastqsanger" label="Second set of paired-end reads"/>
</repeat>
</when>
</conditional>
</when>
<when value="paired_collection">
<param name="fastq" format="fastqsanger" type="data_collection" collection_type="list:paired" label="Select paired collection" help="Specify paired dataset collection containing paired reads"/>
</when>
</conditional>
<section name="genome" title="Reference genome" expanded="true">
<expand macro="source_bwa" arg="--ref" build="--build_ref" ref="a reference genome"/>
</section>
<section name="te" title="Transposable Elements" expanded="true">
<expand macro="source_bwa" arg="--TE" build="--build_TE" ref="reference TE sequences"/>
</section>
<section name="rnadb" title="RNA Blast database" expanded="true">
<conditional name="blast">
<param name="run" type="select" label="Should blast be ran?">
<option value="true">Yes</option>
<option value="false">No</option>
</param>
<when value="true">
<expand macro="source_blast" arg="--rnadb" build="--build_rnadb" ref="reference RNA sequences"/>
</when>
<when value="false" />
</conditional>
</section>
<section name="estdb" title="EST Blast database" expanded="true">
<conditional name="blast">
<param name="run" type="select" label="Should blast be ran?">
<option value="true">Yes</option>
<option value="false">No</option>
</param>
<when value="true">
<expand macro="source_blast" arg="--estdb" build="--build_estdb" ref="reference EST sequences"/>
</when>
<when value="false" />
</conditional>
</section>
<param argument="--rmsk" type="data" format="tabular" label="Tab-delimited text file (with headers) containing reference repeat sequences (e.g. rmsk track from UCSC)"/>
<param argument="--refseq" type="data" format="tabular" label="Tab-delimited file (with headers) containing reference genes (e.g. RefGene.txt from UCSC)"/>
<param name="BDir" type="select" >
<option value="0">Undirectional libraries</option>
<option value="1">TEs sequences in first read in pair</option>
<option value="2">TEs sequences in second read in pair</option>
</param>
<param argument="--size_read" name="size" type="integer" value="100" label="Reads size"/>
<param argument="--size_insert" type="integer" value="250" label="Maximum insert size (bp)"/>
<param argument="--min_L1" type="integer" value="50" label="Minimun bp mapping on selected TEs database"/>
<param argument="--mis_L1" type="integer" value="1" label="Number of mismatches tolerated in TEs mapping sequences"/>
<param argument="--min_unique" type="integer" value="33" label="Minimum consecutive bp corresponding to a unique sequence"/>
<param argument="--species" type="text" value="human" label="Species or clade of the input sequence (the species name must be a valid NCBI Taxonomy Database species name and be contained in the RepeatMasker repeat database)"/>
</inputs>
<outputs>
<data format="html" name="chimerae" label="${tool.name}_on_${on_string}"/>
</outputs>
<tests>
<test>
<conditional name="inputs">
<param name="type" value="datasets"/>
<conditional name="datasets">
<param name="custom_name" value="true"/>
<repeat name="fastq">
<param name="first" value="one.fastq" ftype="fastqsanger" />
<param name="name" value="test"/>
<param name="second" value="two.fastq" ftype="fastqsanger" />
</repeat>
</conditional>
</conditional>
<section name="genome">
<conditional name="source">
<param name="source" value="history" />
<param name="file" value ="genome.fa" />
</conditional>
</section>
<section name="te">
<conditional name="source">
<param name="source" value="history" />
<param name="file" value ="TE.fa" />
</conditional>
</section>
<section name="rnadb">
<conditional name="blast">
<param name="run" value="true" />
<conditional name="source">
<param name="source" value="history" />
<param name="file" value ="rna-small.fa.gz" />
</conditional>
</conditional>
</section>
<section name="estdb">
<conditional name="blast">
<param name="run" value="true" />
<conditional name="source">
<param name="source" value="history" />
<param name="file" value ="est-small.fa.gz" />
</conditional>
</conditional>
</section>
<param name="rmsk" value="rmsk-small.txt" />
<param name="refseq" value="refseq-small.txt" />
<param name="BDir" value="0" />
<param name="size" value="100" />
<param name="size_insert" value="500" />
<param name="min_L1" value="30" />
<param name="mis_L1" value="6" />
<param name="min_unique" value="30" />
<output name="chimerae" file="res.html" compare="diff" lines_diff="0">
<extra_files type="file" name="results.txt" value="res_files/results.txt" compare="diff" />
<extra_files type="file" name="first_results.txt" value="res_files/first_results.txt" compare="diff" />
<extra_files type="file" name="final_result_chimerae.txt" value="res_files/final_result_chimerae.txt" compare="diff" />
</output>
</test>
</tests>
<help>
<![CDATA[
**Usage:**
`CLIFinder.pl --first <first fastq of paired-end set 1> --name <name 1> --second <second fastq of paired-end set 1> [--first <first fastq of paired-end set 2> --name <name 2> --second <second fastq of paired-end set 2> ...] --ref <reference genome> [--build_ref] --TE <transposable elements> [--build_TE] --html <results.html> --html-path <results directory> [options]`
**Arguments:**
--first First fastq file to process from paired-end set
--name Name of the content to process
--second Second fastq file to process from paired-end set
--ref Fasta file containing the reference genome
--TE Fasta file containing the transposable elements
--rmsk Tab-delimited text file (with headers) containing reference repeat sequences (e.g. rmsk track from UCSC)
--refseq Tab-delimited file (with headers) containing reference genes (e.g. RefGene.txt from UCSC)
--html Main HTML file where results will be displayed
--html-path Folder where results will be stored
For any fasta file, if a bwa index is not provided, you should build it through the corresponding *--build_[element]* argument
**Options:**
--rnadb Blast database with RNA sequences (optional)
--estdb Blast database with RNA sequences (optional)
--size_read Size of reads (default: 100)
--BDir Orientation of reads (0: undirectional libraries, 1: TEs sequences in first read in pair, 2: TEs sequences in second read in pair)
--size_insert Maximum size of insert tolerated between R1 and R2 for alignment on the reference genome (default: 250)
--min_L1 Minimum number of bp matching for L1 mapping (default: 50)
--mis_L1 Maximum number of mismatches tolerated for L1 mapping (default: 1)
--min_unique Number of consecutive bp not annotated by RepeatMasker (default: 33)
--species Species to use in RepeatMasker (default: human)
--threads Number of threads (default: 1)
For Blast database files, if a fasta is provided, the database can be built with '--build_[db]'. Otherwise, provide a path or URL. "tar(.gz)" files are acceptable, as well as wild card (rna*) URLs.
]]>
</help>
<citations>
<citation type="doi">10.1093/bioinformatics/btx671</citation>
</citations>
</tool>