Data Format

This tool sets the color of each base according to a data table arranged in two columns:
(1) The base index and (2) The corresponding numeric value.
The columns can be separated by either spaces or tabs.

This data can come from chemical modification studies (e.g. SHAPE) but it can also be manually entered or generated based on any criteria.

Any line in the data that starts with one of the following symbols is considered a comment and is ignored:
Comment Symbols: # ; / ! (hash, semicolon, forward-slash or exclamation point)

Data Example:
#Base	Value
1	0.949369084
2	0.008434194
3	0.115617068
4	0.182823643
5	0.656706731
6	0.761605327
...

Note that it is not necessary to include a line for each nucleotide, but unlisted nucleotides will not be colored.

Value Ranges and Colors

Colors are applied to nucleobases according to a set of rules that specify a value range and a corresponding color.
This tool allows you to flexibly choose the value ranges and colors that make the most sense for your data.
To define the value ranges, you choose a set of numeric limits as well as a comparison operator.
You can click the Add Rule button to add as many rules as are necessary to describe your data. Conversely, you can click Remove Last Rule to remove rules from the bottom of the list. In addition, any rules that are empty (i.e. the "Numeric Limit" or "Color" boxes are blank) will be ignored.
Finally, to reset the list of rules and start over, you can click the Reset List button.


Example 1:

Comparison operator: "<" (less than)
Numeric limits and colors:
Limit   Color
2Red 
0.85Orange 
0.4Black 
This combination of limits and comparison operator lead to the following rules:

Example 2:

The choice of comparison operator is important. If ">" were chosen instead of "<", the same set of numeric limits would produce entirely different rules, as shown in the following example.

Comparison operator: ">" (greater than)
Numeric limits and colors: (same as in Example 1)
This comparison operator would lead to the following rules:

Example 3:

Instead of using < (less-than) or > (greater-than), one can select >= (greater-than-or-equal-to) or <= (less-than-or-equal-to).
The choice of comparison operator (> vs >=  or  < vs <=) can be subtle, but can sometimes have an important impact on the overall colorizing effect.
Note the differences (in italics) between the rules in this example and those in Example 1.

Comparison operator: "<=" (less than or equal to)
Numeric limits and colors: (same as in Example 1)
This comparison operator would lead to the following rules:

Example 4:

Note that in the above examples, there was always a numeric range that fell outside of the rules (e.g. in Example 1, any value greater than or equal to 2 would not have been affected by the coloring operation). This is not a problem if the data has known upper and lower limits, because you can always add more rules to ensure that all valid data values are included. But for some types of data that do not have fixed upper and/or lower limits, it might be safer to add a rule that implicitly covers values that fall outside of the range of other rules. This can be done using the special limits "INF" (infinity) and "-INF" (negative infinity). For example, we could amend Example 1 to cover all values, even those greater than or equal to 2 as follows: Comparison operator: "<" (less than)
Numeric limits and colors:
Limit   Color
INFBlue 
2Red 
0.85Orange 
0.4Black 
This comparison operator and limits would lead to the following rules: Since, by definition, every real data value is less than infinity, the first rule would apply to any number greater than or equal to 2.
A similar situation would occur for the comparison operators > and >= (e.g. in Example 2, where any value less than or equal to 0.4 would have been ignored). In those cases "-INF" could be used to ensure that all values below a given limit would still be included. In Example 2, adding the limit "-INF" with the color "Purple" would have ensured that any value less than or equal to 0.4 would have been colored purple.