1#@UGENE_WORKFLOW
2#This sample describes how to search for TFBS with different methods and how to write the results into one output file.
3#
4#First, the schema reads sequences input by a user. Then, each sequence goes to searching TFBS elements. At that time two reading elements reads the matrix and model for TFBS searching and transfering this data into TFBS searching elements. After that the TFBS searching elements searches TFBS in the input sequences. After that the two data flows multiplexes into one output data flow. And finally, the multiplexed data are written into file, specified by a user.
5#
6#You can configure the parameters of Search for TFBS with Weight Matrix, Search TFBS with SITECON and Multiplexer elements.
7#
8#To try out this sample, add the input files to the Read Sequence element, select the Read Weight Matrix, Read SITECON model and select name and location of the output file in the Write Sequence element and run the schema.
9#
10
11workflow "Search for tfbs"{
12    read-sequence {
13        type:read-sequence;
14        name:"Read Sequence";
15    }
16    write-sequence {
17        type:write-sequence;
18        name:"Write Sequence";
19        document-format:genbank;
20        url-out:tfbs.gb;
21    }
22    multiplexer {
23        type:multiplexer;
24        name:Multiplexer;
25    }
26    sitecon-search {
27        type:sitecon-search;
28        name:"Search for TFBS with SITECON";
29        result-name:sitecon;
30    }
31    wmatrix-search {
32        type:wmatrix-search;
33        name:"Search for TFBS with Weight Matrix";
34        result-name:weight_matrix;
35    }
36    sitecon-read {
37        type:sitecon-read;
38        name:"Read SITECON Model";
39    }
40    wmatrix-read {
41        type:wmatrix-read;
42        name:"Read Weight Matrix";
43    }
44
45
46    .actor-bindings {
47        multiplexer.output-data->write-sequence.in-sequence
48        sitecon-search.out-annotations->multiplexer.input-data-2
49        wmatrix-search.out-annotations->multiplexer.input-data-1
50        sitecon-read.out-sitecon->sitecon-search.in-sitecon
51        wmatrix-read.out-wmatrix->wmatrix-search.in-wmatrix
52        read-sequence.out-sequence->wmatrix-search.in-sequence
53        read-sequence.out-sequence->sitecon-search.in-sequence
54    }
55
56    read-sequence.annotations->write-sequence.in-sequence.annotations
57    sitecon-search.annotations->write-sequence.in-sequence.annotations
58    wmatrix-search.annotations->write-sequence.in-sequence.annotations
59    read-sequence.sequence->write-sequence.in-sequence.sequence
60    read-sequence.sequence->sitecon-search.in-sequence.sequence
61    sitecon-read.sitecon-model->sitecon-search.in-sitecon.sitecon-model
62    read-sequence.sequence->wmatrix-search.in-sequence.sequence
63    wmatrix-read.wmatrix->wmatrix-search.in-wmatrix.wmatrix
64
65    .meta {
66        visual {
67            read-sequence {
68                pos:"-892 -468";
69                style:ext;
70                bg-color-ext:"0 128 128 64";
71                bounds:"-30 -30 150.25 44";
72                out-sequence.angle:357.083;
73            }
74            write-sequence {
75                pos:"-159.25 -474";
76                style:ext;
77                bg-color-ext:"0 128 128 64";
78                bounds:"-30 -30 149.25 50";
79                in-sequence.angle:190.701;
80            }
81            multiplexer {
82                pos:"-408 -524";
83                style:ext;
84                bg-color-ext:"0 128 128 64";
85                bounds:"-30 -30 150 149";
86                input-data-1.angle:236.31;
87                input-data-2.angle:249.034;
88                output-data.angle:339.809;
89            }
90            sitecon-search {
91                pos:"-646 -418";
92                style:ext;
93                bg-color-ext:"0 128 128 64";
94                bounds:"-30 -30 150 149";
95                in-sequence.angle:244.622;
96                in-sitecon.angle:290.726;
97                out-annotations.angle:339.044;
98            }
99            wmatrix-search {
100                pos:"-645 -629";
101                style:ext;
102                bg-color-ext:"0 128 128 64";
103                bounds:"-30 -30 150 150";
104                in-sequence.angle:241.557;
105                in-wmatrix.angle:27.613;
106                out-annotations.angle:338.819;
107            }
108            sitecon-read {
109                pos:"-645 -211";
110                style:ext;
111                bg-color-ext:"0 128 128 64";
112                bounds:"-30 -30 150 40";
113                out-sitecon.angle:28.0725;
114            }
115            wmatrix-read {
116                pos:"-643 -728";
117                style:ext;
118                bg-color-ext:"0 128 128 64";
119                bounds:"-30 -30 146 41";
120                out-wmatrix.angle:323.393;
121            }
122            read-sequence.out-sequence->wmatrix-search.in-sequence {
123                text-pos:"-57.5 -26";
124            }
125            read-sequence.out-sequence->sitecon-search.in-sequence {
126                text-pos:"-57.5 4";
127            }
128            multiplexer.output-data->write-sequence.in-sequence {
129                text-pos:"-24 -75";
130            }
131            sitecon-search.out-annotations->multiplexer.input-data-2 {
132                text-pos:"-10 36";
133            }
134            wmatrix-search.out-annotations->multiplexer.input-data-1 {
135                text-pos:"-10 -69";
136            }
137            sitecon-read.out-sitecon->sitecon-search.in-sitecon {
138                text-pos:"78 -10";
139            }
140            wmatrix-read.out-wmatrix->wmatrix-search.in-wmatrix {
141                text-pos:"13.5 -11";
142            }
143        }
144        wizard {
145            name:"Search for tfbs Wizard";
146            help-page-id:16122698;
147            auto-run: true;
148            page {
149                id:1;
150                next:2;
151                title:"Input sequence(s)";
152                parameters-area {
153                    read-sequence.url-in {
154                        type:datasets;
155                    }
156                }
157            }
158            page {
159                id:2;
160                next:3;
161                title:"Search for TFBS parameters";
162                parameters-area {
163                    group {
164                        title:"Weight Matrix parameters";
165                        label-size:120;
166                        wmatrix-read.url-in {
167                            label:"Weight Matrix";
168                        }
169                        wmatrix-search.result-name {
170                        }
171                        wmatrix-search.strand {
172                        }
173                        wmatrix-search.min-score {
174                        }
175                    }
176                    group {
177                        title:"SITECON parameters";
178                        label-size:120;
179                        sitecon-read.url-in {
180                            label:"SITECON Model";
181                        }
182                        sitecon-search.result-name {
183                        }
184                        sitecon-search.strand {
185                        }
186                        sitecon-search.min-score {
187                        }
188                        sitecon-search.err1 {
189                        }
190                        sitecon-search.err2 {
191                        }
192                    }
193                }
194            }
195            page {
196                id:3;
197                title:"Output data";
198                parameters-area {
199                    group {
200                        title:"Output data";
201                        label-size:120;
202                        write-sequence.url-out {
203                            label:"Result file";
204                        }
205                        write-sequence.accumulate {
206                            label:"Accumulate results";
207                        }
208                    }
209                }
210            }
211        }
212    }
213}
214