annotate gffcompare.xml @ 18:11d232ed904c draft

Uploaded
author enios
date Sat, 22 May 2021 07:35:00 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
11d232ed904c Uploaded
enios
parents:
diff changeset
1 <tool id="gffcompare" name="GffCompare">
11d232ed904c Uploaded
enios
parents:
diff changeset
2 <description>compare assembled transcripts to a reference annotation</description>
11d232ed904c Uploaded
enios
parents:
diff changeset
3 <requirements>
11d232ed904c Uploaded
enios
parents:
diff changeset
4 <container type="docker">bianca7/lncrna:gffcompare</container>
11d232ed904c Uploaded
enios
parents:
diff changeset
5 </requirements>
11d232ed904c Uploaded
enios
parents:
diff changeset
6 <!--version_command>gffcompare -v | awk '{print $2}'</version_command-->
11d232ed904c Uploaded
enios
parents:
diff changeset
7 <command detect_errors="aggressive"><![CDATA[
11d232ed904c Uploaded
enios
parents:
diff changeset
8 #import re
11d232ed904c Uploaded
enios
parents:
diff changeset
9
11d232ed904c Uploaded
enios
parents:
diff changeset
10 #set escaped_element_identifiers = [re.sub('[^\w\-]', '_', str(_.element_identifier)) for _ in $gffinputs]
11d232ed904c Uploaded
enios
parents:
diff changeset
11 #for $input, $escaped_element_identifier in zip($gffinputs, $escaped_element_identifiers):
11d232ed904c Uploaded
enios
parents:
diff changeset
12 ln -s '$input' '$escaped_element_identifier' &&
11d232ed904c Uploaded
enios
parents:
diff changeset
13 #end for
11d232ed904c Uploaded
enios
parents:
diff changeset
14 #if $seq_data.use_seq_data == "Yes":
11d232ed904c Uploaded
enios
parents:
diff changeset
15 #if $seq_data.seq_source.index_source == "history":
11d232ed904c Uploaded
enios
parents:
diff changeset
16 ln -s '$seq_data.seq_source.ref_file' ref_seq.fa &&
11d232ed904c Uploaded
enios
parents:
diff changeset
17 #else:
11d232ed904c Uploaded
enios
parents:
diff changeset
18 ln -s '${seq_data.seq_source.index.fields.path}' ref_seq.fa &&
11d232ed904c Uploaded
enios
parents:
diff changeset
19 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
20 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
21
11d232ed904c Uploaded
enios
parents:
diff changeset
22 #if $annotation.use_ref_annotation == "Yes":
11d232ed904c Uploaded
enios
parents:
diff changeset
23 #if $annotation.ref_source.ref_source_sel == "history":
11d232ed904c Uploaded
enios
parents:
diff changeset
24 ln -s '$annotation.ref_source.reference_annotation' ref_annotation &&
11d232ed904c Uploaded
enios
parents:
diff changeset
25 #else
11d232ed904c Uploaded
enios
parents:
diff changeset
26 ln -s '$annotation.ref_source.index.fields.path' ref_annotation &&
11d232ed904c Uploaded
enios
parents:
diff changeset
27 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
28 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
29
11d232ed904c Uploaded
enios
parents:
diff changeset
30 gffcompare
11d232ed904c Uploaded
enios
parents:
diff changeset
31 ## Use annotation reference?
11d232ed904c Uploaded
enios
parents:
diff changeset
32 #if $annotation.use_ref_annotation == "Yes":
11d232ed904c Uploaded
enios
parents:
diff changeset
33 -r ref_annotation
11d232ed904c Uploaded
enios
parents:
diff changeset
34 $annotation.ignore_nonoverlapping_reference
11d232ed904c Uploaded
enios
parents:
diff changeset
35 $annotation.ignore_nonoverlapping_transfrags
11d232ed904c Uploaded
enios
parents:
diff changeset
36 $annotation.strict_match
11d232ed904c Uploaded
enios
parents:
diff changeset
37 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
38 #if $annotation.refmap_tmap == "":
11d232ed904c Uploaded
enios
parents:
diff changeset
39 -T
11d232ed904c Uploaded
enios
parents:
diff changeset
40 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
41
11d232ed904c Uploaded
enios
parents:
diff changeset
42 ## Use sequence data?
11d232ed904c Uploaded
enios
parents:
diff changeset
43 #if $seq_data.use_seq_data == "Yes":
11d232ed904c Uploaded
enios
parents:
diff changeset
44 -s ref_seq.fa
11d232ed904c Uploaded
enios
parents:
diff changeset
45 #end if
11d232ed904c Uploaded
enios
parents:
diff changeset
46
11d232ed904c Uploaded
enios
parents:
diff changeset
47 $discard_single_exon
11d232ed904c Uploaded
enios
parents:
diff changeset
48 $discard_duplicates
11d232ed904c Uploaded
enios
parents:
diff changeset
49 $no_merge
11d232ed904c Uploaded
enios
parents:
diff changeset
50 -e $max_dist_exon
11d232ed904c Uploaded
enios
parents:
diff changeset
51 -d $max_dist_group
11d232ed904c Uploaded
enios
parents:
diff changeset
52 $chr_stats
11d232ed904c Uploaded
enios
parents:
diff changeset
53 -p '$adv_output.p'
11d232ed904c Uploaded
enios
parents:
diff changeset
54 $adv_output.A
11d232ed904c Uploaded
enios
parents:
diff changeset
55 $adv_output.C
11d232ed904c Uploaded
enios
parents:
diff changeset
56 $adv_output.X
11d232ed904c Uploaded
enios
parents:
diff changeset
57 $adv_output.K
11d232ed904c Uploaded
enios
parents:
diff changeset
58
11d232ed904c Uploaded
enios
parents:
diff changeset
59 #for $escaped_element_identifier in $escaped_element_identifiers:
11d232ed904c Uploaded
enios
parents:
diff changeset
60 '$escaped_element_identifier'
11d232ed904c Uploaded
enios
parents:
diff changeset
61 #end for
11d232ed904c Uploaded
enios
parents:
diff changeset
62
11d232ed904c Uploaded
enios
parents:
diff changeset
63 ]]></command>
11d232ed904c Uploaded
enios
parents:
diff changeset
64 <inputs>
11d232ed904c Uploaded
enios
parents:
diff changeset
65 <param format="gtf" name="gffinputs" type="data" label="GTF inputs for comparison" help="" multiple="true" />
11d232ed904c Uploaded
enios
parents:
diff changeset
66 <conditional name="annotation">
11d232ed904c Uploaded
enios
parents:
diff changeset
67 <param label="Use Reference Annotation" name="use_ref_annotation" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
68 <option value="No">No</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
69 <option value="Yes">Yes</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
70 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
71 <when value="Yes">
11d232ed904c Uploaded
enios
parents:
diff changeset
72 <conditional name="ref_source">
11d232ed904c Uploaded
enios
parents:
diff changeset
73 <param label="Choose the source for the reference annotation" name="ref_source_sel" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
74 <option value="cached">Locally cached</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
75 <option value="history">History</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
76 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
77 <when value="cached">
11d232ed904c Uploaded
enios
parents:
diff changeset
78 <param argument="-r" label="Using reference annotation" name="index" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
79 <options from_data_table="gene_sets">
11d232ed904c Uploaded
enios
parents:
diff changeset
80 <!--filter column="dbkey" key="dbkey" ref="gffinputs" type="data_meta" /-->
11d232ed904c Uploaded
enios
parents:
diff changeset
81 </options>
11d232ed904c Uploaded
enios
parents:
diff changeset
82 <validator message="No reference annotation is available for the build associated with the selected input dataset" type="no_options" />
11d232ed904c Uploaded
enios
parents:
diff changeset
83 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
84 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
85 <when value="history">
11d232ed904c Uploaded
enios
parents:
diff changeset
86 <param argument="-r" format="gff3,gtf" help="Requires an annotation file in GFF3 or GTF format." label="Reference Annotation" name="reference_annotation" type="data" />
11d232ed904c Uploaded
enios
parents:
diff changeset
87 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
88 </conditional>
11d232ed904c Uploaded
enios
parents:
diff changeset
89 <param argument="-R" falsevalue="" help="consider only the reference transcripts that overlap any of the input transfrags (Sn correction)" label="Ignore reference transcripts that are not overlapped by any input transfrags" name="ignore_nonoverlapping_reference" truevalue="-R" type="boolean" />
11d232ed904c Uploaded
enios
parents:
diff changeset
90 <param argument="-Q" falsevalue="" help="consider only the input transcripts that overlap any of the reference transcripts (Sp correction). Warning: this will discard all 'novel' loci!" label="Ignore input transcripts that are not overlapped by any reference transcripts" name="ignore_nonoverlapping_transfrags" truevalue="-Q" type="boolean" />
11d232ed904c Uploaded
enios
parents:
diff changeset
91 <param argument="--strict-match" name="strict_match" type="boolean" checked="false" truevalue="--strict-match" falsevalue="" label="the match code '=' is only assigned when all exon boundaries match" help="code '~' is assigned for intron chain match or single-exon" />
11d232ed904c Uploaded
enios
parents:
diff changeset
92 <param argument="-T" name="refmap_tmap" label="Generate tmap or refmap file for each input file" type="select" multiple="True">
11d232ed904c Uploaded
enios
parents:
diff changeset
93 <option value="refmap" selected="True">refmap</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
94 <option value="tmap" selected="True">tmap</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
95 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
96 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
97 <when value="No">
11d232ed904c Uploaded
enios
parents:
diff changeset
98 <param argument="-T" name="refmap_tmap" label="Generate tmap file for each input file" type="select" multiple="True">
11d232ed904c Uploaded
enios
parents:
diff changeset
99 <option value="tmap" selected="True">tmap</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
100 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
101 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
102 </conditional>
11d232ed904c Uploaded
enios
parents:
diff changeset
103 <conditional name="seq_data">
11d232ed904c Uploaded
enios
parents:
diff changeset
104 <param help="Use sequence data for some optional classification functions, including the addition of the p_id attribute required by Cuffdiff." label="Use Sequence Data" name="use_seq_data" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
105 <option value="No">No</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
106 <option value="Yes">Yes</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
107 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
108 <when value="No"/>
11d232ed904c Uploaded
enios
parents:
diff changeset
109 <when value="Yes">
11d232ed904c Uploaded
enios
parents:
diff changeset
110 <conditional name="seq_source">
11d232ed904c Uploaded
enios
parents:
diff changeset
111 <param label="Choose the source for the reference sequence" name="index_source" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
112 <option value="cached">Locally cached</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
113 <option value="history">History</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
114 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
115 <when value="cached">
11d232ed904c Uploaded
enios
parents:
diff changeset
116 <param argument="-s" label="Using reference genome" name="index" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
117 <options from_data_table="fasta_indexes">
11d232ed904c Uploaded
enios
parents:
diff changeset
118 <filter column="dbkey" key="dbkey" ref="gffinputs" type="data_meta" />
11d232ed904c Uploaded
enios
parents:
diff changeset
119 </options>
11d232ed904c Uploaded
enios
parents:
diff changeset
120 <validator message="No reference genome is available for the build associated with the selected input dataset" type="no_options" />
11d232ed904c Uploaded
enios
parents:
diff changeset
121 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
122 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
123 <when value="history">
11d232ed904c Uploaded
enios
parents:
diff changeset
124 <param argument="-s" format="fasta" label="Using reference file" name="ref_file" type="data" />
11d232ed904c Uploaded
enios
parents:
diff changeset
125 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
126 </conditional>
11d232ed904c Uploaded
enios
parents:
diff changeset
127 </when>
11d232ed904c Uploaded
enios
parents:
diff changeset
128 </conditional>
11d232ed904c Uploaded
enios
parents:
diff changeset
129 <param name="discard_single_exon" argument="-M/-N" type="select" label="Discard single-exon transcripts" help="If -S and also --strict-match is given, exact matching of all exon boundaries is required">
11d232ed904c Uploaded
enios
parents:
diff changeset
130 <option selected="True" value="">No</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
131 <option value="-M">Discard single-exon transfrags and reference transcripts</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
132 <option value="-N">Discard single-exon reference transcripts</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
133 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
134 <param label="Discard duplicates" name="discard_duplicates" type="select">
11d232ed904c Uploaded
enios
parents:
diff changeset
135 <option value="">None</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
136 <option value="-D">discard 'duplicate' query transfrags within a single sample (-D)</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
137 <option value="-S">Only discard 'duplicate' query or reference transcripts if their boundaries are fully contained within other, larger or identical transfrags (-S)</option>
11d232ed904c Uploaded
enios
parents:
diff changeset
138 </param>
11d232ed904c Uploaded
enios
parents:
diff changeset
139 <param name="no_merge" argument="--no-merge" type="boolean" checked="false" truevalue="--no-merge" falsevalue="" label="Disable close-exon merging" help="Default: merge exons separated by 'introns' shorter than 5 bases" />
11d232ed904c Uploaded
enios
parents:
diff changeset
140 <param argument="-e" help="max. distance (range) allowed from free ends of terminal exons of reference transcripts when assessing exon accuracy. Default: 100" label="Max. Distance for assessing exon accuracy" name="max_dist_exon" type="integer" value="100" />
11d232ed904c Uploaded
enios
parents:
diff changeset
141 <param argument="-d" help="max. distance (range) for grouping transcript start sites. Default: 100" label="Max distance for transcript grouping" name="max_dist_group" type="integer" value="100" />
11d232ed904c Uploaded
enios
parents:
diff changeset
142 <param name="chr_stats" argument="--chr-stats" type="boolean" checked="false" truevalue="--chr-stats" falsevalue="" label="Show summary and accuracy data separately for each reference sequence in the transcript accuracy data set" />
11d232ed904c Uploaded
enios
parents:
diff changeset
143 <section name="adv_output" title="Options for the combined GTF output file">
11d232ed904c Uploaded
enios
parents:
diff changeset
144 <param argument="-p" type="text" value="TCONS" label="name prefix for consensus transcripts" help="for combined.gtf" />
11d232ed904c Uploaded
enios
parents:
diff changeset
145 <param argument="-C" type="boolean" checked="false" truevalue="-C" falsevalue="" label="discard matching and 'contained' transfrags" help="i.e. collapse intron-redundant transfrags across all query files" />
11d232ed904c Uploaded
enios
parents:
diff changeset
146 <param argument="-A" type="boolean" checked="false" truevalue="-A" falsevalue="" label="discard the 'contained' transfrags except intron-redundant transfrags starting with a different 5' exon" help="like -C but does not discard intron-redundant transfrags if they start with a different 5' exon" />
11d232ed904c Uploaded
enios
parents:
diff changeset
147 <param argument="-X" type="boolean" checked="false" truevalue="-X" falsevalue="" label="discard the 'contained' transfrags also if ends stick out within the container's introns" help="like -C but also discard contained transfrags if transfrag ends stick out within the container's introns" />
11d232ed904c Uploaded
enios
parents:
diff changeset
148 <param argument="-K" type="boolean" checked="false" truevalue="-K" falsevalue="" label="do NOT discard any redundant transfrag matching a reference" help="for -C/-A/-X" />
11d232ed904c Uploaded
enios
parents:
diff changeset
149 </section>
11d232ed904c Uploaded
enios
parents:
diff changeset
150 </inputs>
11d232ed904c Uploaded
enios
parents:
diff changeset
151 <outputs>
11d232ed904c Uploaded
enios
parents:
diff changeset
152 <data format="txt" from_work_dir="gffcmp.stats" label="${tool.name} on ${on_string}: transcript accuracy" name="transcripts_stats" />
11d232ed904c Uploaded
enios
parents:
diff changeset
153 <data format="tabular" from_work_dir="gffcmp.loci" label="${tool.name} on ${on_string}: loci" name="transcripts_loci" />
11d232ed904c Uploaded
enios
parents:
diff changeset
154 <data format="tabular" from_work_dir="gffcmp.tracking" label="${tool.name} on ${on_string}: data ${gffinputs[0].hid} tracking file" name="transcripts_tracking" />
11d232ed904c Uploaded
enios
parents:
diff changeset
155 <data format="gtf" from_work_dir="gffcmp.combined.gtf" label="${tool.name} on ${on_string}: combined transcripts" name="transcripts_combined">
11d232ed904c Uploaded
enios
parents:
diff changeset
156 <filter>(isinstance(gffinputs, list) and len(gffinputs) > 1) or annotation['use_ref_annotation'] == "No"</filter>
11d232ed904c Uploaded
enios
parents:
diff changeset
157 </data>
11d232ed904c Uploaded
enios
parents:
diff changeset
158 <data format="gtf" from_work_dir="gffcmp.annotated.gtf" label="${tool.name} on ${on_string}: annotated transcripts" name="transcripts_annotated">
11d232ed904c Uploaded
enios
parents:
diff changeset
159 <filter>not (isinstance(gffinputs, list) and len(gffinputs) > 1) and annotation['use_ref_annotation'] == "Yes"</filter>
11d232ed904c Uploaded
enios
parents:
diff changeset
160 </data>
11d232ed904c Uploaded
enios
parents:
diff changeset
161 <collection name="refmap_output" type="list" label="${tool.name} on ${on_string}: refmap">
11d232ed904c Uploaded
enios
parents:
diff changeset
162 <discover_datasets pattern="gffcmp\.(?P&lt;designation&gt;.+)\.refmap" ext="tabular" />
11d232ed904c Uploaded
enios
parents:
diff changeset
163 <filter>annotation['refmap_tmap'] != None and 'refmap' in annotation['refmap_tmap']</filter>
11d232ed904c Uploaded
enios
parents:
diff changeset
164 </collection>
11d232ed904c Uploaded
enios
parents:
diff changeset
165 <collection name="tmap_output" type="list" label="${tool.name} on ${on_string}: tmap">
11d232ed904c Uploaded
enios
parents:
diff changeset
166 <discover_datasets pattern="gffcmp\.(?P&lt;designation&gt;.+)\.tmap" ext="tabular" />
11d232ed904c Uploaded
enios
parents:
diff changeset
167 <filter>annotation['refmap_tmap'] != None and 'tmap' in annotation['refmap_tmap']</filter>
11d232ed904c Uploaded
enios
parents:
diff changeset
168 </collection>
11d232ed904c Uploaded
enios
parents:
diff changeset
169 </outputs>
11d232ed904c Uploaded
enios
parents:
diff changeset
170 <citations>
11d232ed904c Uploaded
enios
parents:
diff changeset
171 <citation type="doi">10.1038/nbt.1621</citation>
11d232ed904c Uploaded
enios
parents:
diff changeset
172 </citations>
11d232ed904c Uploaded
enios
parents:
diff changeset
173 </tool>