Color maps

Recent changes in Java security policy might prevent you from running VARNA.
Check out this page for details and ways to solve the problem.

Full annotation of structure using numerical values: The Color maps example
Java Get Powered

When the colors have a semantic that is related to a numeric value (Conservation, Boltzmann probability...), VARNA offers the possibility to specify these numeric values and automatically maps these values to colors according to a color map.

  • Assign a value for each base through a colorMap parameter.
  • Optional: Set the color map title using colorMapTitle.
  • Set the color map using colorMapStyle.
    Note: the color map is automatically scaled to match the span of values.
Here, we combined these parameters with the columns parameter to display the same (randomly generated) values under six different color map settings:

<applet  code="VARNA.class" codebase="bin"
    archive="VARNA.jar" width="552" height="200">
  <param name="columns" value="6" />
  <param name="sequenceDBN1"  value="ACGAUCGAUCGCAUCGACUACGAUCGC"/>
  <param name="structureDBN1" value="((((((((((.......))))))))))"/>
  <param name="colorMap1" value="2.1,3.0,7.4,3.1,1.4,0.8,9.5,1.5,
   0.1,2.9,1.7,0.6,2.5,4.5,7.3,5.2,1.5,8.8,2.9,9.9,0.5,1.2,4.3,4.4,
   6.3,8.5,7.4,2.5,0.4,8.2,0.8" />
  <param name="colorMapStyle1" value="red" />
  <param name="colorMapCaption1" value="Coolness" />
  <param name="colorMapStyle2" value="green" />
  <param name="colorMapStyle3" value="blue" />
  <param name="colorMapStyle4" value="bw" />
  <param name="colorMapStyle5" value="heat" />
  <param name="colorMapStyle6" value="0:#FFFF00;1:#ffFFFF;6:#FF0000"/>
  <param name="rotation1" value="-20.0" />
</applet>
Custom styles

Custom styles can be defined in a visual way within VARNA thanks to our gradient editor, accessible from VARNA menu (Display>Color Map> Style...).

During the gradient modification, the colorMapStyle code of the current gradient can be found Param. code textfield. One simply needs to copy/paste the content of this field to the value of the colorMapStyle parameter to achieve a similar color map within a web server.

Note to Firefox users: Certain versions of Firefox may be confused by self-signed certificates, and silently prevent the applet from running. If the frame above shows up empty, then try reloading the page.

Previous page: Base Styles
Next page: Adding Labels