/
gffread.xml
675 lines (653 loc) · 34.1 KB
/
gffread.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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
<tool id="gffread" name="gffread" version="@GALAXY_TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05">
<description>Filters and/or converts GFF3/GTF2 records</description>
<macros>
<!-- the version of this tool must not be lowered since in the past 2.x was used
lets use small increments and hope that gffread catches up one day -->
<token name="@GALAXY_TOOL_VERSION@">2.2.1.4</token>
<token name="@TOOL_VERSION@">0.12.7</token>
<token name="@VERSION_SUFFIX@">0</token>
<xml name="fasta_output_select">
<param name="fa_outputs" type="select" display="checkboxes" multiple="true" label="Select fasta outputs">
<option value="-w exons.fa">fasta file with spliced exons for each GFF transcript (-w)</option>
<option value="-x cds.fa">fasta file with spliced CDS for each GFF transcript (-x)</option>
<option value="-y pep.fa">protein fasta file with the translation of CDS for each record (-y)</option>
<option value="-W">for each fasta: record the exon coordinates projected onto the spliced sequence (-W)</option>
<option value="-S">for protein fasta: use '*' instead of '.' as stop codon translation (-S)</option>
</param>
</xml>
<xml name="ref_filtering_select">
<param name="ref_filtering" type="select" display="checkboxes" multiple="true" label="reference based filters">
<option value="-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 (-N)</option>
<option value="-J">discard any mRNAs that either lack initial START codon or the terminal STOP codon, or have an in-frame stop codon (-J)</option>
<option value="-V">discard any mRNAs with CDS having in-frame stop codons (-V)</option>
<option value="-H">check and adjust the starting CDS phase if the original phase leads to a translation with an in-frame stop codon (-H with -V)</option>
<!-- gffread bug: B not in missing from param to the arg parser
<option value="-B">single-exon transcripts are also checked on the opposite strand (-B with -V)</option>
-->
</param>
</xml>
<xml name="trackname">
<param argument="-t" name="tname" type="text" value="" optional="true" label="Trackname to use in the second column of each GFF output line" help="">
<validator type="regex">\w+</validator>
</param>
</xml>
<xml name="merge_opts">
<option value="-K">also collapse shorter, fully contained transcripts with fewer introns than the container (-K)</option>
<option value="-Q">remove the containment restriction: multi-exon transcripts will be collapsed if just their introns match, while single-exon transcripts can partially overlap 80% (-Q)</option>
<option value="-d dupinfo">output collapsing info (-d)</option>
</xml>
<xml name="cluster_opts">
<option value="--force-exons"> make sure that the lowest level GFF features are printed as 'exon' features (--force-exons)</option>
<option value="-Z">merge close exons into a single exon (for intron size < 4) (-Z)</option>
</xml>
<xml name="merge_opt_sel">
<param name="merge_options" type="select" display="checkboxes" multiple="true" label="Merge options">
<expand macro="cluster_opts" />
<expand macro="merge_opts" />
</param>
</xml>
<xml name="cluster_opt_sel">
<param name="merge_options" type="select" display="checkboxes" multiple="true" label="Cluster options">
<expand macro="cluster_opts" />
</param>
</xml>
</macros>
<xrefs>
<xref type="bio.tools">gffread</xref>
</xrefs>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">gffread</requirement>
</requirements>
<version_command>gffread --version</version_command>
<command detect_errors="aggressive">
<![CDATA[
#if $reference_genome.source == 'history':
ln -s '$reference_genome.genome_fasta' genomeref.fa &&
#end if
gffread '$input'
#if $input.ext.startswith("bed")
--in-bed
#end if
#if $reference_genome.source == 'cached':
-g '${reference_genome.fasta_indexes.fields.path}'
#if $reference_genome.ref_filtering and str($reference_genome.ref_filtering) != '':
#echo ' '.join(str($reference_genome.ref_filtering).split(','))
#end if
#elif $reference_genome.source == 'history':
-g genomeref.fa
#if $reference_genome.ref_filtering and str($reference_genome.ref_filtering) != '':
#echo ' '.join(str($reference_genome.ref_filtering).split(','))
#end if
#end if
#if $filtering and str($filtering) != '':
#echo " "
#echo ' '.join(str($filtering).split(','))
#end if
#if $maxintron and $maxintron > 0:
-i $maxintron
#end if
#if $region.region_filter == 'filter':
-r '$region.range' $region.discard_partial
#end if
#if $merging.merge_sel != 'none':
$merging.merge_cmd
#if $merging.merge_options:
#echo ' '.join(str($merging.merge_options).split(','))
#end if
#end if
#if $chr_replace:
-m '$chr_replace'
#end if
$full_gff_attribute_preservation
$decode_url
$expose
##
## Although documented, does not appear to be used in the gffread code
## #if $seq_info:
## -A -s "$seq_info"
## #end if
##
## outputs
#if $reference_genome.source != 'none':
#if $reference_genome.fa_outputs and str($reference_genome.fa_outputs) != '':
#echo ' ' + ' '.join(str($reference_genome.fa_outputs).split(','))
#end if
#end if
#if $gffs.gff_fmt != 'none':
#if $gffs.gff_fmt != 'bed' and $gffs.tname:
-t '$gffs.tname'
#end if
#if $gffs.gff_fmt == 'gff':
#if $input.datatype.file_ext == 'gtf':
$gffs.ensembl
#end if
#end if
#if $gffs.gff_fmt == 'gtf'
-T
#elif $gffs.gff_fmt == 'bed'
--bed
#end if
-o output.$gffs.gff_fmt
#else if 'fa_outputs' not in $reference_genome or '.fa' not in str($reference_genome['fa_outputs'])
-o output.gff
#end if
## Missing options
##
## --ids
## --nids
## -l
## --jmatch
## --nc
## --ignore-locus
## -A -s (see above)
## --sort-alpha : chromosomes (reference sequences) are sorted alphabetically
## --sort-by : sort the reference sequences by the order in which their
## names are given in the <refseq.lst> file
## Misc
## --keep-exon-attrs : for -F option, do not attempt to reduce redundant
## --attrs
## --keep-genes : in transcript-only mode (default), also preserve gene records
## --keep-comments: for GFF3 input/output, try to preserve comments
## -B (see above)
## -P
## --add-hasCDS : add a "hasCDS" attribute with value "true" for transcripts
## that have CDS features
## --adj-stop stop codon adjustment: enables -P and performs automatic
## adjustment of the CDS stop coordinate if premature or downstream
## --in-tlf: input GFF-like one-line-per-transcript format without exon/CDS
## features (see --tlf option below); automatic if the input
## filename ends with .tlf)
## --stream: fast processing of input GFF/BED transcripts as they are received
## ((no sorting, exons must be grouped by transcript in the input data)
## Clustering
## -Y
## Output
## --gene2exon
## --t-adopt
## -j
## --w-add
## --w-nocds
]]>
</command>
<inputs>
<param name="input" type="data" format="bed,gff3,gtf" label="Input BED, GFF3 or GTF feature file"/>
<!-- filtering -->
<param name="filtering" type="select" display="checkboxes" multiple="true" label="filters">
<option value="-U">discard single-exon transcripts (-U)</option>
<option value="-C">coding only: discard mRNAs that have no CDS feature (-C)</option>
<option value="-G">only parse additional exon attributes from the first exon and move them to the mRNA level (useful for GTF input) (-G)</option>
<option value="-O">process also non-transcript GFF records (by default non-transcript records are ignored) (-O)</option>
<option value="--no-pseudo">filter out records matching the 'pseudo' keyword (--no-pseudo)</option>
</param>
<conditional name="region">
<param name="region_filter" type="select" label="Filter by genome region">
<option value="none">No</option>
<option value="filter">Yes</option>
</param>
<when value="none"/>
<when value="filter">
<param argument="-r" name="range" type="text" value="" label="Only show transcripts overlapping coordinate range">
<help><![CDATA[
[['strand']'chr':]'start'..'end' <br>
examples: <br>
1000..500000 <br>
chr1:1000..500000 <br>
+chr1:1000..500000 <br>
-chr1:1000..500000
]]>
</help>
<validator type="regex">(([+-])?(\w+:))?\d+\.\.\d+</validator>
</param>
<param argument="-R" name="discard_partial" type="boolean" truevalue="-R" falsevalue="" checked="false"
label="Discard all transcripts that are not fully contained within the given range" help=""/>
</when>
</conditional>
<param argument="-i" name="maxintron" type="integer" value="" optional="true" min="0" label="Filter out transcipts with large introns"
help="If set, discard transcripts having an intron larger"/>
<param argument="-m" name="chr_replace" type="data" format="tabular" optional="true" label="Replace reference sequence names" >
<help><![CDATA[
chr_replace is a reference sequence replacement table consisting of 2 columns: "original_ref_ID" "new_ref_ID"<br>
It is useful for switching between Ensembl and UCSC naming conventions <br>
NOTE: GFF records on reference sequences that are not found among the "original_ref_ID" entries in this file will be filtered out
]]>
</help>
</param>
<!-- Although documented, does not appear to be used in the gffread code
<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">
<help>
(-s seq_info.fsize -A) useful with mRNA/EST/protein mappings <br>
seq_info input file is a 3 column tab-delimited file providing this info for each of the mapped sequences: <br>
"seq-name" "seq-length" "seq-description" <br>
</help>
</param>
-->
<!-- merging -->
<conditional name="merging">
<param name="merge_sel" type="select" label="Transcript merging" help="">
<option value="none">none</option>
<option value="merge">merge: cluster the input transcripts into loci, collapsing matching transcripts (--merge)</option>
<option value="cluster">cluster-only: merge but without collapsing matching transcripts (--cluster-only)</option>
</param>
<when value="none"/>
<when value="merge">
<param name="merge_cmd" type="hidden" value="--merge"/>
<expand macro="merge_opt_sel" />
</when>
<when value="cluster">
<param name="merge_cmd" type="hidden" value="--cluster-only"/>
<expand macro="cluster_opt_sel" />
</when>
</conditional>
<!-- reference sequence file -->
<!-- Error: -g option is required for options -w, -x, -y, -V, -N, -M -->
<conditional name="reference_genome">
<param name="source" type="select" label="Reference Genome" help="NOTE: Required for fasta outputs">
<option value="none">none</option>
<option value="cached">Cached reference data</option>
<option value="history">From your history</option>
</param>
<when value="none"/>
<when value="cached">
<param argument="-g" name="fasta_indexes" type="select" label="Source FASTA Sequence">
<options from_data_table="all_fasta"/>
</param>
<expand macro="ref_filtering_select" />
<expand macro="fasta_output_select" />
</when>
<when value="history">
<param argument="-g" name="genome_fasta" type="data" format="fasta" label="Genome Reference Fasta"/>
<expand macro="ref_filtering_select" />
<expand macro="fasta_output_select" />
</when>
</conditional>
<!-- outputs -->
<conditional name="gffs">
<param name="gff_fmt" type="select" label="Feature File Output" help="(-o output.gff3|output.gtf)">
<option value="none">none</option>
<option value="gff">GFF</option>
<option value="gtf">GTF</option>
<option value="bed">BED</option>
</param>
<when value="none"/>
<when value="gff">
<param argument="-L" name="ensembl" type="boolean" truevalue="-L" falsevalue="" checked="false" label="Ensembl GTF to GFF3 conversion" help=""/>
<expand macro="trackname" />
</when>
<when value="gtf">
<expand macro="trackname" />
</when>
<when value="bed"/>
</conditional>
<param argument="-F" name="full_gff_attribute_preservation" type="boolean" truevalue="-F" falsevalue="" checked="false"
label="full GFF attribute preservation (all attributes are shown)" help=""/>
<param argument="-D" name="decode_url" type="boolean" truevalue="-D" falsevalue="" checked="false"
label="decode url encoded characters within attributes" help=""/>
<param argument="-E" name="expose" type="boolean" truevalue="-E" falsevalue="" checked="false"
label="warn about duplicate transcript IDs and other potential problems with the given GFF/GTF records" help=""/>
</inputs>
<outputs>
<data name="output_gff" format="gff3" metadata_source="input" label="${tool.name} on ${on_string}: gff3" from_work_dir="output.gff">
<!-- output gff also if the user deselected all outputs: none is selected and all .fa outputs are disabled -->
<filter>gffs['gff_fmt'] == 'gff' or (gffs['gff_fmt'] == 'none' and ('fa_outputs' not in reference_genome or '.fa' not in str(reference_genome['fa_outputs'])))</filter>
</data>
<data name="output_gtf" format="gtf" metadata_source="input" label="${tool.name} on ${on_string}: gtf" from_work_dir="output.gtf">
<filter>gffs['gff_fmt'] == 'gtf'</filter>
</data>
<data name="output_bed" format="bed" metadata_source="input" label="${tool.name} on ${on_string}: bed" from_work_dir="output.bed">
<filter>gffs['gff_fmt'] == 'bed'</filter>
</data>
<data name="output_exons" format="fasta" label="${tool.name} on ${on_string}: exons.fa" from_work_dir="exons.fa">
<filter>'fa_outputs' in reference_genome and str(reference_genome['fa_outputs']).find('exons.fa') > 0 </filter>
</data>
<data name="output_cds" format="fasta" label="${tool.name} on ${on_string}: cds.fa" from_work_dir="cds.fa">
<filter>'fa_outputs' in reference_genome and str(reference_genome['fa_outputs']).find('cds.fa') > 0</filter>
</data>
<data name="output_pep" format="fasta" label="${tool.name} on ${on_string}: pep.fa" from_work_dir="pep.fa">
<filter>'fa_outputs' in reference_genome and str(reference_genome['fa_outputs']).find('pep.fa') > 0</filter>
</data>
<data name="output_dupinfo" format="txt" label="${tool.name} on ${on_string}: dupinfo" from_work_dir="dupinfo">
<filter>'merge_options' in merging and merging['merge_options'].find('dupinfo') > 0</filter>
</data>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="gff_fmt" value="gff"/>
<output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" />
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<!-- mapping -->
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="gff_fmt" value="gff"/>
<param name="chr_replace" ftype="tabular" value="chr_replace"/>
<output name="output_gff" ftype="gff3">
<assert_contents>
<has_n_lines n="314"/>
<has_line_matching expression="^chr.*"/>
<has_line_matching expression="^1.*" negate="true"/>
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<!-- none output and all .fa outputs deselected .. gff is produced anyway, since we need one output -->
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" />
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<!-- test ensemble gtf to gff conversion -->
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<conditional name="gffs">
<param name="gff_fmt" value="gff"/>
<param name="ensembl" value="true"/>
<param name="tname" value="track name"/>
</conditional>
<output name="output_gff" file="Homo_sapiens.GRCh37_19.71_ensemble.gff3" ftype="gff3" lines_diff="4" />
<assert_command>
<has_text text="-L"/>
<has_text text="-t 'track name'"/>
</assert_command>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="gff_fmt" value="gff"/>
<output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" />
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="ecoli-k12.gff3"/>
<param name="gff_fmt" value="gff"/>
<param name="full_gff_attribute_preservation" value="-F"/>
<output name="output_gff" file="ecoli-k12.processed.gff3" ftype="gff3" lines_diff="4" />
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<!-- bed output -->
<test expect_num_outputs="1">
<param name="input" ftype="gff3" value="Homo_sapiens.GRCh37_19.71.gff3"/>
<param name="gff_fmt" value="bed"/>
<output name="output_bed" ftype="bed">
<assert_contents>
<has_n_lines n="42"/>
<has_n_columns n="13"/>
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<!-- bed input and test tname -->
<test expect_num_outputs="1">
<param name="input" ftype="bed" value="Homo_sapiens.GRCh37_19.71.bed"/>
<param name="gff_fmt" value="gff"/>
<param name="tname" value="track name"/>
<output name="output_bed" ftype="gff3">
<assert_contents>
<has_n_lines n="388"/>
<!-- this will work with https://github.com/galaxyproject/galaxy/pull/12528 -->
<!-- <has_n_columns n="9" comment="#"/> -->
<has_text text="track name"/>
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="region_filter" value="filter"/>
<param name="range" value="19:496500..504965"/>
<param name="gff_fmt" value="gtf"/>
<output name="output_gtf">
<assert_contents>
<has_text text="ENST00000587541" />
<has_text text="ENST00000382683" />
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="region_filter" value="filter"/>
<param name="range" value="19:496500..504965"/>
<param name="discard_partial" value="true"/>
<param name="gff_fmt" value="gtf"/>
<output name="output_gtf">
<assert_contents>
<not_has_text text="ENST00000587541" />
<has_text text="ENST00000382683" />
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="filtering" value="-C"/>
<param name="region_filter" value="filter"/>
<param name="range" value="19:496500..504965"/>
<param name="gff_fmt" value="gtf"/>
<output name="output_gtf">
<assert_contents>
<not_has_text text="ENST00000587541" />
<has_text text="ENST00000382683" />
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="4">
<param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
<param name="source" value="history"/>
<param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/>
<param name="fa_outputs" value="-w exons.fa,-x cds.fa,-y pep.fa"/>
<param name="region_filter" value="filter"/>
<param name="range" value="19:496500..504965"/>
<param name="gff_fmt" value="gtf"/>
<output name="output_gtf">
<assert_contents>
<has_text text="ENST00000587541" />
<has_text text="ENST00000382683" />
</assert_contents>
</output>
<output name="output_exons">
<assert_contents>
<has_text text="ENST00000346144 CDS=47-934" />
<has_text text="CTATTTAAGCGGCTTCCCCGCGGCCTCGGGACAGAGGGGACTGAGCATGGATTTCGGACTGGCCCTCCTG" />
</assert_contents>
</output>
<output name="output_cds">
<assert_contents>
<has_text text="ENST00000346144" />
<has_text text="ATGGATTTCGGACTGGCCCTCCTGCTGGCGGGGCTTCTGGGGCTCCTCCTCGGCCAGTCCCTCCAGGTGA" />
</assert_contents>
</output>
<output name="output_pep">
<assert_contents>
<has_text text="ENST00000346144" />
<has_text text="MDFGLALLLAGLLGLLLGQSLQVKPLQVEPPEPVVAVALGASRQLTCRLACADRGASVQWRGLDTSLGAV" />
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
<test expect_num_outputs="1">
<param name="input" ftype="gtf" value="stop_codons.gtf"/>
<param name="source" value="history"/>
<param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/>
<param name="fa_outputs" value="-y pep.fa,-S"/>
<output name="output_pep">
<assert_contents>
<has_text text="ENST00000269812" />
<has_text text="PLRGLHPRV*LQTPLERCPCWPPAGGTGGCPHCLLHLRLLQSPTPTALSEGGGAGTEAQPVTDVDPGRG*" />
</assert_contents>
</output>
<assert_stdout>
<has_n_lines n="0"/>
</assert_stdout>
</test>
</tests>
<help>
<![CDATA[
**gffread Filters and/or converts GFF3/GTF2 records**
The gffread command is documented with the stringtie_ package.
.. _stringtie: http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread
gffread v0.12.7. Usage: ::
gffread [-g <genomic_seqs_fasta> | <dir>] [-s <seq_info.fsize>]
[-o <outfile>] [-t <trackname>] [-r [<strand>]<chr>:<start>-<end> [-R]]
[--jmatch <chr>:<start>-<end>] [--no-pseudo]
[-CTVNJMKQAFPGUBHZWTOLE] [-w <exons.fa>] [-x <cds.fa>] [-y <tr_cds.fa>]
[-j ][--ids <IDs.lst> | --nids <IDs.lst>] [--attrs <attr-list>] [-i <maxintron>]
[--stream] [--bed | --gtf | --tlf] [--table <attrlist>] [--sort-by <ref.lst>]
[<input_gff>]
Filter, convert or cluster GFF/GTF/BED records, extract the sequence of
transcripts (exon or CDS) and more.
By default (i.e. without -O) only transcripts are processed, discarding any
other non-transcript features. Default output is a simplified GFF3 with only
the basic attributes.
Options:
--ids discard records/transcripts if their IDs are not listed in <IDs.lst>
--nids discard records/transcripts if their IDs are listed in <IDs.lst>
-i discard transcripts having an intron larger than <maxintron>
-l discard transcripts shorter than <minlen> bases
-r only show transcripts overlapping coordinate range <start>..<end>
(on chromosome/contig <chr>, strand <strand> if provided)
-R for -r option, discard all transcripts that are not fully
contained within the given range
--jmatch only output transcripts matching the given junction
-U discard single-exon transcripts
-C coding only: discard mRNAs that have no CDS features
--nc non-coding only: discard mRNAs that have CDS features
--ignore-locus : discard locus features and attributes found in the input
-A use the description field from <seq_info.fsize> and add it
as the value for a 'descr' attribute to the GFF record
-s <seq_info.fsize> is a tab-delimited file providing this info
for each of the mapped sequences:
<seq-name> <seq-length> <seq-description>
(useful for -A option with mRNA/EST/protein mappings)
Sorting: (by default, chromosomes are kept in the order they were found)
--sort-alpha : chromosomes (reference sequences) are sorted alphabetically
--sort-by : sort the reference sequences by the order in which their
names are given in the <refseq.lst> file
Misc options:
-F keep all GFF attributes (for non-exon features)
--keep-exon-attrs : for -F option, do not attempt to reduce redundant
exon/CDS attributes
-G do not keep exon attributes, move them to the transcript feature
(for GFF3 output)
--attrs <attr-list> only output the GTF/GFF attributes listed in <attr-list>
which is a comma delimited list of attribute names to
--keep-genes : in transcript-only mode (default), also preserve gene records
--keep-comments: for GFF3 input/output, try to preserve comments
-O process other non-transcript GFF records (by default non-transcript
records are ignored)
-V discard any mRNAs with CDS having in-frame stop codons (requires -g)
-H for -V option, check and adjust the starting CDS phase
if the original phase leads to a translation with an
in-frame stop codon
-B for -V option, single-exon transcripts are also checked on the
opposite strand (requires -g)
-P add transcript level GFF attributes about the coding status of each
transcript, including partialness or in-frame stop codons (requires -g)
--add-hasCDS : add a "hasCDS" attribute with value "true" for transcripts
that have CDS features
--adj-stop stop codon adjustment: enables -P and performs automatic
adjustment of the CDS stop coordinate if premature or downstream
-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)
-J discard any mRNAs that either lack initial START codon
or the terminal STOP codon, or have an in-frame stop codon
(i.e. only print mRNAs with a complete CDS)
--no-pseudo: filter out records matching the 'pseudo' keyword
--in-bed: input should be parsed as BED format (automatic if the input
filename ends with .bed*)
--in-tlf: input GFF-like one-line-per-transcript format without exon/CDS
features (see --tlf option below); automatic if the input
filename ends with .tlf)
--stream: fast processing of input GFF/BED transcripts as they are received
((no sorting, exons must be grouped by transcript in the input data)
Clustering:
-M/--merge : cluster the input transcripts into loci, discarding
"redundant" transcripts (those with the same exact introns
and fully contained or equal boundaries)
-d <dupinfo> : for -M option, write duplication info to file <dupinfo>
--cluster-only: same as -M/--merge but without discarding any of the
"duplicate" transcripts, only create "locus" features
-K for -M option: also discard as redundant the shorter, fully contained
transcripts (intron chains matching a part of the container)
-Q for -M option, no longer require boundary containment when assessing
redundancy (can be combined with -K); only introns have to match for
multi-exon transcripts, and >=80% overlap for single-exon transcripts
-Y for -M option, enforce -Q but also discard overlapping single-exon
transcripts, even on the opposite strand (can be combined with -K)
Output options:
--force-exons: make sure that the lowest level GFF features are considered
"exon" features
--gene2exon: for single-line genes not parenting any transcripts, add an
exon feature spanning the entire gene (treat it as a transcript)
--t-adopt: try to find a parent gene overlapping/containing a transcript
that does not have any explicit gene Parent
-D decode url encoded characters within attributes
-Z merge very close exons into a single exon (when intron size<4)
-g full path to a multi-fasta file with the genomic sequences
for all input mappings, OR a directory with single-fasta files
(one per genomic sequence, with file names matching sequence names)
-j output the junctions and the corresponding transcripts
-w write a fasta file with spliced exons for each transcript
--w-add <N> for the -w option, extract additional <N> bases
both upstream and downstream of the transcript boundaries
--w-nocds for -w, disable the output of CDS info in the FASTA file
-x write a fasta file with spliced CDS for each GFF transcript
-y write a protein fasta file with the translation of CDS for each record
-W for -w, -x and -y options, write in the FASTA defline all the exon
coordinates projected onto the spliced sequence;
-S for -y option, use '*' instead of '.' as stop codon translation
-L Ensembl GTF to GFF3 conversion, adds version to IDs
-m <chr_replace> is a name mapping table for converting reference
sequence names, having this 2-column format:
<original_ref_ID> <new_ref_ID>
-t use <trackname> in the 2nd column of each GFF/GTF output line
-o write the output records into <outfile> instead of stdout
-T main output will be GTF instead of GFF3
--bed output records in BED format instead of default GFF3
--tlf output "transcript line format" which is like GFF
but with exons and CDS related features stored as GFF
attributes in the transcript feature line, like this:
exoncount=N;exons=<exons>;CDSphase=<N>;CDS=<CDScoords>
<exons> is a comma-delimited list of exon_start-exon_end coordinates;
<CDScoords> is CDS_start:CDS_end coordinates or a list like <exons>
--table output a simple tab delimited format instead of GFF, with columns
having the values of GFF attributes given in <attrlist>; special
pseudo-attributes (prefixed by @) are recognized:
@id, @geneid, @chr, @start, @end, @strand, @numexons, @exons,
@cds, @covlen, @cdslen
If any of -w/-y/-x FASTA output files are enabled, the same fields
(excluding @id) are appended to the definition line of corresponding
FASTA records
-v,-E expose (warn about) duplicate transcript IDs and other potential
problems with the given GFF/GTF records
]]>
</help>
<citations>
<citation type="doi">10.1038/nbt.1621</citation>
</citations>
</tool>