To add a constraint element add the required algorithm elements to the scene and drug&drop the required constraint element.

When a *constraint element is added*, two *algorithm elements* are selected.

There are four types of constraints that you can impose on the positional relationship of the results obtained from the algorithms calculations: *End-Start*, *Start-End*, *End-End* and *Start-Start*.

On the image below you can see a *schema* with *Pattern* and *ORF* algorithm elements and an *End-Start* constraint:

<center> <br> <img src="/wiki/download/attachments/4686286/Constraint Elements.png"/> <br> </center> |

This means the following:

1. The algorithm elements specify to analyze the sequence with Pattern and ORF algorithms. The results of these analyses are the sets of annotations.

2. The condition says that the distance between a “Pattern annotation end” and an “ORF annotation start” should be within the specified bounds, i.e.:

Let:

**pattern_annot_end** := the last nucleotide of an annotation obtained from the Pattern algorithm calculations

**orf_annot_start** := the first nucleotide of an annotation obtained from the ORF algorithm calculations

The constraint is:

0bp <= Distance(**pattern_annot_end**, **orf_annot_start**) <= 100bp

Find the details on each constraint element below.