- Select the Tools ‣ Query Designer item in the main menu.
Result: The Query Designer window appears:
![](/wiki/download/attachments/4686206/How to Create and Run Schema.png)
- Drag the Repeats element from the Palette to the Scene.
Result: The Repeats element subunits are presented on the Scene:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_1.png)
Note, that by default minimum distance between left and right repeats is 0bp, the maximum distance is 5000bp.
- Slide the Repeats element subunits apart.
Result:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_2.png)
- Drag the ORF element from the Palette and drop it between the repeats.
Result: The ORF element is presented on the Scene:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_3.png)
- Find the End-Start constraint on the Palette:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_4.png)
And drag it between the left Repeats element and ORF.
Result: The dialog appears:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_5.png)
- Check that From equals to Repeats.left and To equals to ORF. Set Max to 5000. Press the OK button.
Result: The constraint has been added to the elements:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_6.png)
- Repeat steps 5-6 for ORF element and the right Repeats subunit.
Result: The schema looks as follows:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_7.png)
- Press the Run Schema button on the toolbar:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_8.png)
Result: The Run schema dialog appears:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_9.png)
- Browse for the sequence to analyze (the Load sequence field) and for a GenBank file to save results to (the Save results to field). Click the Run button.
Result: Both the sequence and the file with annotations are added to the current project. The sequence appears in the Sequence View window, for example:
![](/wiki/download/attachments/4686206/How to Create and Run Schema_10.png)
To learn more about the Sequence View read main UGENE User Manual.
The schema described in this example is also available as sample schema. Select the Samples tab on the Palette and double-click the ORF-Repeats to open the sample schema.