Mercurial > repos > jjohnson > gffread
comparison gffread.xml @ 0:c636d01ad343 draft
Uploaded
author | jjohnson |
---|---|
date | Sun, 28 Dec 2014 16:33:55 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c636d01ad343 |
---|---|
1 <tool id="gffread" name="gffread" version="2.2.1"> | |
2 <description>Filters and/or converts GFF3/GTF2 records</description> | |
3 <description>transcript assembly and FPKM (RPKM) estimates for RNA-Seq data</description> | |
4 <expand macro="requirements" /> | |
5 <expand macro="stdio" /> | |
6 <macros> | |
7 <import>cuff_macros.xml</import> | |
8 <xml name="fasta_output_select"> | |
9 <param name="fa_outputs" type="select" display="checkboxes" multiple="true" label="Select fasta outputs"> | |
10 <option value="-w exons.fa">(-w) a fasta file with spliced exons for each GFF transcript</option> | |
11 <option value="-x cds.fa">(-x) a fasta file with spliced CDS for each GFF transcript</option> | |
12 <option value="-y pep.fa">(-y) a protein fasta file with the translation of CDS for each record</option> | |
13 <option value="-W">(-W) for each fasta record the exon coordinates projected onto the spliced sequence</option> | |
14 </param> | |
15 </xml> | |
16 <xml name="ref_filtering_select"> | |
17 <param name="ref_filtering" type="select" display="checkboxes" multiple="true" label="reference based filters"> | |
18 <option value="-N">(-N) discard multi-exon mRNAs that have any intron with a non-canonical splice site consensus (i.e. not GT-AG, GC-AG or AT-AC)</option> | |
19 <option value="-J">(-J) discard any mRNAs that either lack initial START codon or the terminal STOP codon, or have an in-frame stop codon (only print mRNAs with a fulll, valid CDS)</option> | |
20 <option value="-V">(-V) discard any mRNAs with CDS having in-frame stop codons</option> | |
21 <option value="-H">(-H with -V) check and adjust the starting CDS phase if the original phase leads to a translation with an in-frame stop codon</option> | |
22 <option value="-B">(-B with -V) single-exon transcripts are also checked on the opposite strand</option> | |
23 </param> | |
24 </xml> | |
25 <xml name="trackname"> | |
26 <param name="tname" type="text" value="" optional="true" label="(-t) Trackname to use in the second column of each GFF output line"> | |
27 <validator type="regex">\w+</validator> | |
28 </param> | |
29 </xml> | |
30 <xml name="merge_opts"> | |
31 <option value="-K">(-K) also collapse shorter, fully contained transcripts with fewer introns than the container</option> | |
32 <option value="-Q">(-Q) remove the containment restriction (multi-exon transcripts will be collapsed if just their introns match, while single-exon transcripts can partially overlap 80%)</option> | |
33 <option value="-d dupinfo">(-d) output collapsing info</option> | |
34 </xml> | |
35 <xml name="cluster_opts"> | |
36 <option value="--force-exons">(--force-exons) make sure that the lowest level GFF features are printed as 'exon' features</option> | |
37 <option value="-Z">(-Z) merge close exons into a single exon (for intron size < 4)</option> | |
38 </xml> | |
39 <xml name="merge_opt_sel"> | |
40 <param name="merge_options" type="select" display="checkboxes" multiple="true" label="Merge options"> | |
41 <expand macro="cluster_opts" /> | |
42 <expand macro="merge_opts" /> | |
43 </param> | |
44 </xml> | |
45 <xml name="cluster_opt_sel"> | |
46 <param name="merge_options" type="select" display="checkboxes" multiple="true" label="Cluster options"> | |
47 <expand macro="cluster_opts" /> | |
48 </param> | |
49 </xml> | |
50 </macros> | |
51 <command> | |
52 <![CDATA[ | |
53 #if $reference_genome.source == 'history': | |
54 ln -s $reference_genome.genome_fasta genomeref.fa && | |
55 #end if | |
56 gffread $input | |
57 #if $reference_genome.source == 'cached': | |
58 -g "${reference_genome.fasta_indexes.fields.path}" | |
59 #if $reference_genome.ref_filtering and str($reference_genome.ref_filtering) != '': | |
60 #echo ' '.join(str($reference_genome.ref_filtering).split(',')) | |
61 #end if | |
62 #elif $reference_genome.source == 'history': | |
63 -g genomeref.fa | |
64 #if $reference_genome.ref_filtering and str($reference_genome.ref_filtering) != '': | |
65 #echo ' '.join(str($reference_genome.ref_filtering).split(',')) | |
66 #end if | |
67 #end if | |
68 #if $filtering and str($filtering) != '': | |
69 #echo " " | |
70 #echo ' '.join(str($filtering).split(',')) | |
71 #end if | |
72 #if $maxintron and $maxintron > 0: | |
73 -i $maxintron | |
74 #end if | |
75 #if $region.region_filter == 'filter': | |
76 -r $region.range $region.discard_partial | |
77 #end if | |
78 #if $merging.merge_sel != 'none': | |
79 $merging.merge_cmd | |
80 #echo ' '.join(str($merging.merge_options).split(',')) | |
81 #end if | |
82 #if $chr_replace: | |
83 -m "$chr_replace" | |
84 #end if | |
85 ## Does not seem to actually be used in the gffread code | |
86 ## #if $seq_info: | |
87 ## -A -s "$seq_info" | |
88 ## #end if | |
89 ## outputs | |
90 #if $reference_genome.source != 'none': | |
91 #if $reference_genome.fa_outputs and str($reference_genome.fa_outputs) != '': | |
92 #echo ' ' + ' '.join(str($reference_genome.fa_outputs).split(',')) | |
93 #end if | |
94 #end if | |
95 #if $gffs.gff_fmt != 'none': | |
96 #if $gffs.tname: | |
97 -t "$gffs.tname" | |
98 #end if | |
99 #if $gffs.gff_fmt == 'gff': | |
100 #if $input.datatype.file_ext == 'gft': | |
101 $gffs.ensembl | |
102 #end if | |
103 $gffs.output_cmd | |
104 #elif $gffs.gff_fmt == 'gtf': | |
105 $gffs.output_cmd | |
106 #end if | |
107 #end if | |
108 ]]> | |
109 </command> | |
110 <inputs> | |
111 <param name="input" type="data" format="gff3,gtf" label="Input GFF3 or GTF feature file"/> | |
112 <!-- filtering --> | |
113 <param name="filtering" type="select" display="checkboxes" multiple="true" label="filters"> | |
114 <option value="-U">(-U) discard single-exon transcripts</option> | |
115 <option value="-C">(-C) coding only: discard mRNAs that have no CDS feature</option> | |
116 <option value="-G">(-G) only parse additional exon attributes from the first exon and move them to the mRNA level (useful for GTF input)</option> | |
117 <option value="-O">(-O) process also non-transcript GFF records (by default non-transcript records are ignored)</option> | |
118 <option value="--no-pseudo">(--no-pseudo) filter out records matching the 'pseudo' keyword</option> | |
119 </param> | |
120 <conditional name="region"> | |
121 <param name="region_filter" type="select" label="Filter by genome region"> | |
122 <option value="none">No</option> | |
123 <option value="filter">Yes</option> | |
124 </param> | |
125 <when value="none"/> | |
126 <when value="filter"> | |
127 <param name="range" type="text" value="" label="Only show transcripts overlapping coordinate range" | |
128 help="-r [['strand']'chr':]'start'..'end' <br> examples: <br> 1000..500000 <br> chr1:1000..500000 <br> +chr1:1000..500000 <br> -chr1:1000..500000" > | |
129 <validator type="regex">(([+-])?(\w+:))?\d+\.\.\d+</validator> | |
130 </param> | |
131 <param name="discard_partial" type="boolean" truevalue="-R" falsevalue="" check="false" | |
132 label="(-R) and discard all transcripts that are not fully contained within the given range"/> | |
133 </when> | |
134 </conditional> | |
135 <param name="maxintron" type="integer" value="" optional="true" min="0" label="(-i) max_intron - Filter out transcipts with large introns" | |
136 help="If set, discard transcripts having an intron larger"/> | |
137 <param name="chr_replace" type="data" format="tabular" optional="true" label="Replace reference sequence names (e.g. chr1 with 1)" > | |
138 <help>(-m chr_replace) <br> | |
139 chr_replace is input file is a 2 column tab-delimited file containing a reference (genomic) sequence replacement table with this format: <br> | |
140 "original_ref_ID" "new_ref_ID" <br> | |
141 GFF records on reference sequences that are not found among the "original_ref_ID" entries in this file will be filtered out | |
142 </help> | |
143 </param> | |
144 | |
145 <!-- Does not appear to be used in the gffread code | |
146 <param name="seq_info" type="data" format="tabular" optional="true" label="Use the description field as the value for a 'descr' attribute to the GFF record"> | |
147 <help> | |
148 (-s seq_info.fsize -A) useful with mRNA/EST/protein mappings <br> | |
149 seq_info input file is a 3 column tab-delimited file providing this info for each of the mapped sequences: <br> | |
150 "seq-name" "seq-length" "seq-description" <br> | |
151 </help> | |
152 </param> | |
153 --> | |
154 | |
155 <!-- merging --> | |
156 <conditional name="merging"> | |
157 <param name="merge_sel" type="select" label="(-M) Transcript merging"> | |
158 <option value="none">none</option> | |
159 <option value="merge">merge: cluster the input transcripts into loci, collapsing matching transcripts</option> | |
160 <option value="cluster">cluster-only: merge but without collapsing matching transcripts</option> | |
161 </param> | |
162 <when value="none"/> | |
163 <when value="merge"> | |
164 <param name="merge_cmd" type="hidden" value="--merge"/> | |
165 <expand macro="merge_opt_sel" /> | |
166 </when> | |
167 <when value="cluster"> | |
168 <param name="merge_cmd" type="hidden" value="--cluster-only"/> | |
169 <expand macro="cluster_opt_sel" /> | |
170 </when> | |
171 </conditional> | |
172 <!-- reference sequence file --> | |
173 <!-- Error: -g option is required for options -w, -x, -y, -V, -N, -M --> | |
174 <conditional name="reference_genome"> | |
175 <param name="source" type="select" label="(-g) Reference Genome (Required for fasta outputs)"> | |
176 <option value="none">none</option> | |
177 <option value="cached"></option> | |
178 <option value="history">From your history</option> | |
179 </param> | |
180 <when value="none"> | |
181 </when> | |
182 <when value="cached"> | |
183 <param name="fasta_indexes" type="select" label="Source FASTA Sequence"> | |
184 <options from_data_table="all_fasta"/> | |
185 </param> | |
186 <expand macro="ref_filtering_select" /> | |
187 <expand macro="fasta_output_select" /> | |
188 </when> | |
189 <when value="history"> | |
190 <param name="genome_fasta" type="data" format="fasta" label="Genome Reference Fasta"/> | |
191 <expand macro="ref_filtering_select" /> | |
192 <expand macro="fasta_output_select" /> | |
193 </when> | |
194 </conditional> | |
195 | |
196 <!-- outputs --> | |
197 <conditional name="gffs"> | |
198 <param name="gff_fmt" type="select" optional="true" label="(-o) Feature File Output"> | |
199 <option value="none">none</option> | |
200 <option value="gff">GFF</option> | |
201 <option value="gtf">GTF</option> | |
202 </param> | |
203 <when value="none"> | |
204 </when> | |
205 <when value="gff"> | |
206 <param name="output_cmd" type="hidden" value="-o output.gff3"/> | |
207 <param name="ensembl" type="boolean" truevalue="-F" falsevalue="" check="false" label="(-L) Ensembl GTF to GFF3 conversion"/> | |
208 <expand macro="trackname" /> | |
209 </when> | |
210 <when value="gtf"> | |
211 <param name="output_cmd" type="hidden" value="-T -o output.gtf"/> | |
212 <expand macro="trackname" /> | |
213 </when> | |
214 </conditional> | |
215 | |
216 <param name="full_gff_attribute_preservation" type="boolean" truevalue="-F" falsevalue="" check="false" | |
217 label="(-F) full GFF attribute preservation (all attributes are shown)"/> | |
218 <param name="decode_url" type="boolean" truevalue="-D" falsevalue="" check="false" | |
219 label="(-D) decode url encoded characters within attributes"/> | |
220 <param name="expose" type="boolean" truevalue="-E" falsevalue="" check="false" | |
221 label="(-E) warn about duplicate transcript IDs and other potential problems with the given GFF/GTF records"/> | |
222 | |
223 </inputs> | |
224 <outputs> | |
225 <data name="output_gff" format="gff3" metadata_source="input" label="${tool.name} on ${on_string}: gff3" from_work_dir="output.gff3"> | |
226 <filter>gffs['gff_fmt'] == 'gff'</filter> | |
227 </data> | |
228 <data name="output_gtf" format="gtf" metadata_source="input" label="${tool.name} on ${on_string}: gtf" from_work_dir="output.gtf"> | |
229 <filter>gffs['gff_fmt'] == 'gtf'</filter> | |
230 </data> | |
231 <data name="output_exons" format="fasta" label="${tool.name} on ${on_string}: exons.fa" from_work_dir="exons.fa"> | |
232 <filter>'fa_outputs' in reference_genome and str(reference_genome['fa_outputs']).find('exons.fa') > 0 </filter> | |
233 </data> | |
234 <data name="output_cds" format="fasta" label="${tool.name} on ${on_string}: cds.fa" from_work_dir="cds.fa"> | |
235 <filter>'fa_outputs' in reference_genome and str(reference_genome['fa_outputs']).find('cds.fa') > 0</filter> | |
236 </data> | |
237 <data name="output_pep" format="fasta" label="${tool.name} on ${on_string}: pep.fa" from_work_dir="pep.fa"> | |
238 <filter>'fa_outputs' in reference_genome and str(reference_genome['fa_outputs']).find('pep.fa') > 0</filter> | |
239 </data> | |
240 <data name="output_dupinfo" format="txt" label="${tool.name} on ${on_string}: dupinfo" from_work_dir="dupinfo"> | |
241 <filter>'merge_options' in merging and merging['merge_options'].find('dupinfo') > 0</filter> | |
242 </data> | |
243 </outputs> | |
244 <tests> | |
245 <test> | |
246 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> | |
247 <param name="gff_fmt" value="gff"/> | |
248 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" /> | |
249 </test> | |
250 | |
251 <test> | |
252 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> | |
253 <param name="filtering" value="--no-pseudo"/> | |
254 <param name="gff_fmt" value="gtf"/> | |
255 <output name="output_gtf"> | |
256 <assert_contents> | |
257 <not_has_text text="pseudo" /> | |
258 </assert_contents> | |
259 </output> | |
260 </test> | |
261 | |
262 <test> | |
263 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> | |
264 <param name="region_filter" value="filter"/> | |
265 <param name="range" value="19:496500..504965"/> | |
266 <param name="gff_fmt" value="gtf"/> | |
267 <output name="output_gtf"> | |
268 <assert_contents> | |
269 <has_text text="ENST00000587541" /> | |
270 <has_text text="ENST00000382683" /> | |
271 </assert_contents> | |
272 </output> | |
273 </test> | |
274 | |
275 <test> | |
276 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> | |
277 <param name="region_filter" value="filter"/> | |
278 <param name="range" value="19:496500..504965"/> | |
279 <param name="discard_partial" value="true"/> | |
280 <param name="gff_fmt" value="gtf"/> | |
281 <output name="output_gtf"> | |
282 <assert_contents> | |
283 <has_text text="ENST00000587541" /> | |
284 <has_text text="ENST00000382683" /> | |
285 </assert_contents> | |
286 </output> | |
287 </test> | |
288 | |
289 <test> | |
290 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> | |
291 <param name="filtering" value="-C"/> | |
292 <param name="region_filter" value="filter"/> | |
293 <param name="range" value="19:496500..504965"/> | |
294 <param name="gff_fmt" value="gtf"/> | |
295 <output name="output_gtf"> | |
296 <assert_contents> | |
297 <not_has_text text="ENST00000587541" /> | |
298 <has_text text="ENST00000382683" /> | |
299 </assert_contents> | |
300 </output> | |
301 </test> | |
302 | |
303 <test> | |
304 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> | |
305 <param name="source" value="history"/> | |
306 <param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/> | |
307 <param name="fa_outputs" value="-w exons.f,-x cds.fa,-y pep.fa"/> | |
308 <param name="region_filter" value="filter"/> | |
309 <param name="range" value="19:496500..504965"/> | |
310 <param name="gff_fmt" value="gtf"/> | |
311 <output name="output_gtf"> | |
312 <assert_contents> | |
313 <not_has_text text="ENST00000587541" /> | |
314 <has_text text="ENST00000382683" /> | |
315 </assert_contents> | |
316 </output> | |
317 <output name="output_exons"> | |
318 <assert_contents> | |
319 <has_text text="ENST00000346144 gene=MADCAM1 CDS=47-932" /> | |
320 <has_text text="CTATTTAAGCGGCTTCCCCGCGGCCTCGGGACAGAGGGGACTGAGCATGGATTTCGGACTGGCCCTCCTG" /> | |
321 </assert_contents> | |
322 </output> | |
323 <output name="output_cds"> | |
324 <assert_contents> | |
325 <has_text text="ENST00000346144 gene=MADCAM1" /> | |
326 <has_text text="ATGGATTTCGGACTGGCCCTCCTGCTGGCGGGGCTTCTGGGGCTCCTCCTCGGCCAGTCCCTCCAGGTGA" /> | |
327 </assert_contents> | |
328 </output> | |
329 <output name="output_pep"> | |
330 <assert_contents> | |
331 <has_text text="ENST00000346144 gene=MADCAM1" /> | |
332 <has_text text="MDFGLALLLAGLLGLLLGQSLQVKPLQVEPPEPVVAVALGASRQLTCRLACADRGASVQWRGLDTSLGAV" /> | |
333 </assert_contents> | |
334 </output> | |
335 </test> | |
336 | |
337 </tests> | |
338 <help> | |
339 <![CDATA[ | |
340 **gffread Filters and/or converts GFF3/GTF2 records** | |
341 | |
342 Usage: :: | |
343 | |
344 gffread "input_gff" [-g "genomic_seqs_fasta" | "dir"][-s "seq_info.fsize"] | |
345 [-o "outfile.gff"] [-t "tname"] [-r [["strand"]"chr":]"start".."end" [-R]] | |
346 [-CTVNJMKQAFGUBHZWTOLE] [-w "exons.fa"] [-x "cds.fa"] [-y "tr_cds.fa"] | |
347 [-i "maxintron"] | |
348 | |
349 Options: :: | |
350 | |
351 -g full path to a multi-fasta file with the genomic sequences | |
352 for all input mappings, OR a directory with single-fasta files | |
353 (one per genomic sequence, with file names matching sequence names) | |
354 -s <seq_info.fsize> is a tab-delimited file providing this info | |
355 for each of the mapped sequences: | |
356 <seq-name> <seq-length> <seq-description> | |
357 (useful for -A option with mRNA/EST/protein mappings) | |
358 -i discard transcripts having an intron larger than <maxintron> | |
359 -r only show transcripts overlapping coordinate range <start>..<end> | |
360 (on chromosome/contig <chr>, strand <strand> if provided) | |
361 -R for -r option, discard all transcripts that are not fully | |
362 contained within the given range | |
363 -U discard single-exon transcripts | |
364 -C coding only: discard mRNAs that have no CDS feature | |
365 -F full GFF attribute preservation (all attributes are shown) | |
366 -G only parse additional exon attributes from the first exon | |
367 and move them to the mRNA level (useful for GTF input) | |
368 -A use the description field from <seq_info.fsize> and add it | |
369 as the value for a 'descr' attribute to the GFF record | |
370 | |
371 -O process also non-transcript GFF records (by default non-transcript | |
372 records are ignored) | |
373 -V discard any mRNAs with CDS having in-frame stop codons | |
374 -H for -V option, check and adjust the starting CDS phase | |
375 if the original phase leads to a translation with an | |
376 in-frame stop codon | |
377 -B for -V option, single-exon transcripts are also checked on the | |
378 opposite strand | |
379 -N discard multi-exon mRNAs that have any intron with a non-canonical | |
380 splice site consensus (i.e. not GT-AG, GC-AG or AT-AC) | |
381 -J discard any mRNAs that either lack initial START codon | |
382 or the terminal STOP codon, or have an in-frame stop codon | |
383 (only print mRNAs with a fulll, valid CDS) | |
384 --no-pseudo: filter out records matching the 'pseudo' keyword | |
385 | |
386 -M/--merge : cluster the input transcripts into loci, collapsing matching | |
387 transcripts (those with the same exact introns and fully contained) | |
388 -d <dupinfo> : for -M option, write collapsing info to file <dupinfo> | |
389 --cluster-only: same as --merge but without collapsing matching transcripts | |
390 -K for -M option: also collapse shorter, fully contained transcripts | |
391 with fewer introns than the container | |
392 -Q for -M option, remove the containment restriction: | |
393 (multi-exon transcripts will be collapsed if just their introns match, | |
394 while single-exon transcripts can partially overlap (80%)) | |
395 | |
396 --force-exons: make sure that the lowest level GFF features are printed as | |
397 "exon" features | |
398 -E expose (warn about) duplicate transcript IDs and other potential | |
399 problems with the given GFF/GTF records | |
400 -D decode url encoded characters within attributes | |
401 -Z merge close exons into a single exon (for intron size<4) | |
402 -w write a fasta file with spliced exons for each GFF transcript | |
403 -x write a fasta file with spliced CDS for each GFF transcript | |
404 -W for -w and -x options, also write for each fasta record the exon | |
405 coordinates projected onto the spliced sequence | |
406 -y write a protein fasta file with the translation of CDS for each record | |
407 -L Ensembl GTF to GFF3 conversion (implies -F; should be used with -m) | |
408 -m <chr_replace> is a reference (genomic) sequence replacement table with | |
409 this format: | |
410 <original_ref_ID> <new_ref_ID> | |
411 GFF records on reference sequences that are not found among the | |
412 <original_ref_ID> entries in this file will be filtered out | |
413 -o the "filtered" GFF records will be written to <outfile.gff> | |
414 (use -o- for printing to stdout) | |
415 -t use <trackname> in the second column of each GFF output line | |
416 -T -o option will output GTF format instead of GFF3 | |
417 | |
418 | |
419 | |
420 | |
421 | |
422 ]]> | |
423 </help> | |
424 </tool> |