The
position condition applies to DNA tracks and Numeric tracks and is evaluated for each individual position in a sequence.
Operations will only be applied to positions where the condition holds true.
The general syntax for this type of condition in protocols is as follows:
| where [not] <OperandTrack> <operator> [<Operand2>] |
If the optional
not keyword is specified immediately after "where", the truth value of the whole condition following it will be inverted.
The operand track referred to within the condition itself does not have to be the same as the target track that the operation is applied to, and this operand can be of any type (DNA, Numeric or Region track).
Depending on the type of operand track chosen, different comparisons are possible as described in the tables below.
Operand track is a
Numeric Dataset
| Operand | Operator | Operand2 | Description |
| NumericTrack1 | = | value | The condition holds true if the value in this position of NumericTrack1 equals the value of Operand2 |
| NumericTrack1 | >= | value | The condition holds true if the value in this position of NumericTrack1 is equal to or greater than the value of Operand2 |
| NumericTrack1 | > | value | The condition holds true if the value in this position of NumericTrack1 is greater than the value of Operand2 |
| NumericTrack1 | <= | value | The condition holds true if the value in this position of NumericTrack1 is equal to or less than the value of Operand2 |
| NumericTrack1 | < | value | The condition holds true if the value in this position of NumericTrack1 is less than the value of Operand2 |
| NumericTrack1 | <> | value | The condition holds true if the value in this position of NumericTrack1 is not equal to the value of Operand2 |
| NumericTrack1 | in | N to M | The condition holds true if the value in this position of NumericTrack1 is between the two values N and M (inclusive) |
The value(s) of Operand2 must be numeric and can be provided either as a constant number, a Numeric Variable, a Sequence Numeric Map or a (second) Numeric Dataset.
If a Sequence Numeric Map is used, the value of Operand2 will be the value for the current sequence in the map.
If a Numeric Dataset is used, the value of Operand2 will be the value in the corresponding position of this track (i.e. the two tracks are compared position by position).
Operand track is a
DNA Sequence Dataset
| Operand | Operator | Operand2 | Description |
| DNATrack1 | equals | base letter | The condition holds true if the DNA base in this position of DNATrack1 is equal to that of Operand2. The comparison is done in a case-insensitive way. |
| DNATrack1 | matches | IUPAC letter | The condition holds true if the DNA base in this position of DNATrack1 matches the IUPAC code of Operand2 |
| DNATrack1 | case-sensitive equals | base letter | The condition holds true if the DNA base in this position of DNATrack1 is equal to that of Operand2 and the two bases also have the same case (upper or lower) |
| DNATrack1 | is uppercase | | The condition holds true if the DNA base in this position of DNATrack1 is in uppercase |
| DNATrack1 | is lowercase | | The condition holds true if the DNA base in this position of DNATrack1 is in lowercase |
| DNATrack1 | has same case as | base letter | The condition holds true if the DNA base in this position of DNATrack1 has the same case (upper or lower) as that of Operand2 |
The value of Operand2 must be a single DNA base letter (or IUPAC consensus letter) which can be provided either as a literal string (enclosed in double quotes), a Text Variable or a (second) DNA track.
If the value is provided as a string or Text Variable, only the first letter in the text is used even if the actual string might be longer.
If a second DNA track is used, the value of Operand2 will be the value in the corresponding position of this track (i.e. the two tracks are compared position by position).
By default the comparisons use DNA bases taken from the direct strand (even if the sequence itself has reverse orientation), and this was also the only option available in MotifLab v1.
In version 2.0+ of MotifLab, it is possible to use bases from the relative strand by adding the qualifier relative strand after the "equals", "matches" and "case-sensitive equals" operators.
| DNATrack1 | equals relative strand | base letter | Same as "equals" but the DNA base is taken from the reverse strand of DNATrack1 if the current sequence has reverse orientation. |
| DNATrack1 | matches relative strand | IUPAC letter | Same as "matches" but the DNA base is taken from the reverse strand of DNATrack1 if the current sequence has reverse orientation. |
| DNATrack1 | case-sensitive equals relative strand | base letter | Same as "case-sensitive equals" but the DNA base is taken from the reverse strand of DNATrack1 if the current sequence has reverse orientation. |
Operand track is a
Region Dataset
| Operand | Operator | Operand2 | Description |
| RegionTrack1 | inside | | The condition holds true if this position overlaps with a region in RegionTrack1 |
| RegionTrack1 | bases overlap | RegionTrack2 | The condition holds true if this position overlaps with regions in both RegionTrack1 and RegionTrack2 |
| RegionTrack1 | bases not overlap | RegionTrack2 | The condition holds true if this position overlaps with a region in RegionTrack1 but not with a region in RegionTrack2 |
| RegionTrack1 | regions overlap | RegionTrack2 | The condition holds true if this position overlaps with a region in RegionTrack1 and that region also overlaps with a region in RegionTrack2 (although not necessarily at this position). The condition thus holds true for all positions within regions of RegionTrack1 that overlap with regions in RegionTrack2 |
| RegionTrack1 | regions not overlap | RegionTrack2 | The condition holds true if this position overlaps with a region in RegionTrack1 and that region does not overlap with a region in RegionTrack2. The condition thus holds true for all positions within regions of RegionTrack1 that do not overlap with regions in RegionTrack2 |
Illustration:
The black regions indicate the bases where the condition holds true for the different comparison operators when the operand is a Region Dataset.