CGView - Circular Genome Viewer
CGView XML - cgview element
XML - cgview element
The cgview element is the root element of the XML document that is used to describe CGView maps. Its attributes specify the overall appearance of the map (width, height, background color, etc). The cgview element contains featureSlot and legend elements, which describe the contents of the map.

The following sample CGView document shows the relationship of the cgview element to the other elements:

<?xml version="1.0" encoding="ISO-8859-1"?> <cgview backboneRadius="160" sequenceLength="10000" backboneColor="green" height="600" width="600"> <featureSlot strand="direct"> <feature color="red" decoration="clockwise-arrow" label="feature X"> <featureRange start="4630" stop="4700" /> </feature> </featureSlot> <legend position="upper-center" font="SansSerif,bold-italic,40"> <legendItem text="Example map" textAlignment="center" /> </legend> </cgview>

This is the map generated by the above document:

output of above document

Required cgview attributes
Attribute Description Values
sequenceLength Specifies the length of the DNA molecule being mapped, in base pairs. integer between 1 and 10,000,000.
Optional cgview attributes
Attribute Description Values Default value
arrowheadLength Sets the length of the arrowhead used for features that are drawn as arrows. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
backboneColor Sets the color of the circle used to represent the sequence backbone. color gray
backboneRadius Sets the radius of the circle (in pixels) used to represent the sequence backbone. Generally the radius should be about 0.4 times the imageWidth or imageHeight (the smaller of the two). You may want to decrease the backboneRadius value to provide more space for feature labels and legends. real between 10.0 and 12000.0. 190.0
backboneThickness Sets the thickness of the line used to draw the circle that represents the sequence backbone. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
backgroundColor Sets the color of the map canvas. color white
borderColor Sets the color of the map border. color black
featureSlotSpacing Sets the amount of blank space placed between the concentric feature rings (featureSlots). xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
featureThickness Sets the maximum thickness of the arcs used when drawing features. featureSlot elements can override this value using their own featureThickness attribute. The widths of individual features can be varied using the proportionOfThickness attribute in the feature element. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
giveFeaturePositions Specifies whether or not feature position information (the base pair position of the start and stop of the feature) should be added to feature labels that are drawn. true - feature position information should be added.
false - feature position information should not be added.
auto - feature position information should only be added when a zoomed map is drawn.
false
globalLabel Specifies whether or not feature labels should be drawn on this map. When set to false this value overrides the showLabel attributes in all child elements and prevents labels from being drawn. When set to true the showLabel attributes in child elements are used to determine whether or not labels are drawn. When set to auto labels are only drawn when a zoomed map is drawn and when the showLabel attributes in child elements are set to true. true - feature labels should be drawn.
false - feature labels should not be drawn.
auto - feature labels should be drawn only when a zoomed map is drawn.
true
globalLabelColor By default, labels are colored to match the color of the feature they represent. If globalLabelColor is defined all labels are colored according to the globalLabelColor value. color -
height Sets the height of this map in pixels. integer between 100 and 30,000. 700
isLinear Specifies whether or not the map is representing a linear molecule. When set to true the map is drawn with a divider line and sequence end labels to indicate the molecule is linear. However, the map is still drawn as a circle. true - this is a linear molecule.
false - this is not a linear molecule.
false
labelFont Sets the font used for feature labels. feature elements can override this setting using their font attribute. font SansSerif, plain, 10
labelLineLength Sets the initial length of the line that is drawn to connect features to their labels. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
labelLineThickness The thickness of the line that is drawn to connect features to their labels. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
labelPlacementQuality Alters the placement of feature labels. Higher quality settings lead to better label placement but slower program execution. good
better
best
better
labelsToKeep Before CGView attempts to place labels, labels are randomly discarded if there are more labels than the labelsToKeep value. integer 1000
longTickColor Sets the color of the long tick marks in the sequence ruler. color black
minimumFeatureLength When very small features are drawn they are artificially increased in length to the minimumFeatureLength, to ensure that they are visible. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
xxx-small
moveInnerLabelsToOuter Specifies whether or not inner labels should be moved from the inside of the backbone circle to the outside of the backbone circle when there is insufficient room on the inside on the backbone circle. true - inner labels should be moved.
false - inner labels should not be moved.
true
origin Sets the clock position of the sequence beginning on the circular map backbone. integer between 1 and 12. 12
rulerFont Sets the font used for the sequence ruler. font SansSerif, plain, 8
rulerFontColor Sets the color of the text used for the sequence ruler. color black
rulerPadding Sets the spacing between the inner tickmarks and the sequence ruler labels. Increase this value when the sequence ruler numbers are overlapping the tickmarks. real 10.0
rulerUnits Sets the units used for the sequence ruler. bases - base pair units.
centisomes - centisome units.
bases
shortTickColor Sets the color of the short tick marks in the sequence ruler. color black
shortTickThickness Sets the thickness of the short tick marks in the sequence ruler. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
showBorder Specifies whether or not a border should be drawn around the map. true - a border should be drawn.
false - a border should not be drawn.
true
showShading Specifies whether or not map items should be drawn with shading. featureSlot elements can override this value using their own showShading attribute. true - shading should be used.
false - shading should not be used.
true
showWarning Specifies whether or not CGView should add certain warning messages to the lower left of this map. true - warning messages should be added.
false - warning messages should not be added.
false
tickDensity Adjusts the density of the tick marks in the sequence ruler. real between 0.0 and 1.0. 1.0
tickLength Sets the length of the tick marks in the sequence ruler. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
tickThickness Sets the thickness of the tick marks in the sequence ruler. xxx-small
xx-small
x-small
small
medium
large
x-large
xx-large
xxx-large
or real
medium
title Specifies a title for this map. The title will appear in the center of the backbone circle when an unzoomed map is drawn. text -
titleFontColor Sets the color of the text used for the map title. color black
titleFont Sets the font used for the map title. font SansSerif, plain, 12
useColoredLabelBackgrounds Specifies whether or not a colored rectangle should be drawn around each feature label. true - a colored rectangle should be drawn.
false - a colored rectangle should not be drawn.
false
useInnerLabels Specifies whether or not reverse-strand feature labels (labels drawn for features in reverse-strand featureSlots) should be drawn on the inside of the backbone circle, i.e. whether or not inner labels should be used. When inner labels are not used, all labels are drawn on the outside of the backbone circle. true - reverse-strand labels should be drawn on the inside.
false - reverse-strand labels should not be drawn on the inside.
auto - reverse-strand labels should be drawn on the inside only when a zoomed map is drawn.
auto
warningFont Sets the font used for the warnings drawn when the showWarning attribute is set to true. font SansSerif, plain, 8
warningFontColor Sets the color of the text used for the warnings drawn when the showWarning attribute is set to true. color black
width Sets the width of this map in pixels. integer between 100 and 30,000. 700
zeroTickColor Sets the color of the tick mark drawn at the boundary between the sequence start and end. color black

color = the color name (black for example), or the RGB values for the color (rgb(0,255,0) for example). The following color names are supported: aqua, black, blue, fuchsia, gray (and grey), green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow.

font = the name of the font, followed by the style, and then the size. An example font is Monospaced, bold, 50. Valid font names are: Default, Dialog, DialogInput, Monospaced, Serif, and SansSerif. Valid styles are: plain, bold, italic, and bold-italic.

integer = a whole number between -2,147,483,648 and +2,147,483,647.

real = a real number between 1.4e-45 and 3.4e+38.

Citing CGView: