CGView - Circular Genome Viewer
CGView XML - feature element
XML - feature element
The feature element (along with the featureRange element) is used to describe individual sequence features. It can specify, for example, the color, opacity, and thickness of a feature. It can also be used to provide a label for the feature. The feature element does not dictate which bases contain the feature. The position information is instead provided by featureRange elements placed inside the feature element. For convenience, the child featureRange elements have attributes that can override nearly all of the parent attributes. The feature element can contain any number of featureRange elements. The feature element is a child of the featureSlot element.

The following sample CGView document shows how feature and featureRange elements can be used to describe sequence features:

<?xml version="1.0" encoding="ISO-8859-1"?> <cgview backboneRadius="160" sequenceLength="1000" height="600" width="600" featureThickness="small" > <featureSlot strand="direct"> <feature color="red" decoration="clockwise-arrow" label="feature A"> <featureRange start="50" stop="100" /> <featureRange start="120" stop="150" /> <featureRange start="300" stop="350" /> </feature> <feature color="blue" decoration="counterclockwise-arrow" label="feature B"> <featureRange start="390" stop="590" decoration="arc" label="feature X" proportionOfThickness="0.1" radiusAdjustment="0.5" /> <featureRange start="1" stop="40" /> <featureRange start="160" stop="250" /> <featureRange start="380" stop="450" showLabel="false" /> <featureRange start="460" stop="600" decoration="arc" showLabel="false" /> </feature> </featureSlot> </cgview>

This is the map generated by the above document:

output of above document

Required feature attributes
Attribute Description Values
- - -
Optional feature attributes
Attribute Description Values Default value
color Sets the color of this feature. featureRange elements can override this setting using their own color attribute. color blue
decoration Specifies how this feature should be drawn. featureRange elements can override this setting using their own decoration attribute. arc - draw this feature as an arc.
hidden - do not draw this feature (it will still be labelled).
counterclockwise-arrow - draw this feature as an arrow pointing in the counterclockwise direction.
clockwise-arrow - draw this feature as an arrow pointing in the clockwise direction.
arc
font Sets the font used for this feature's label. featureRange elements can override this setting using their own font attribute. font Inherited from the labelFont value of the parent cgview element.
hyperlink A hyperlink for this feature's label. featureRange elements can override this setting using their own hyperlink attribute. Be sure to escape any special XML characters that appear in the URL. See the XML Overview. URL -
label A label for this feature. featureRange elements can override this setting using their own label attribute. text -
mouseover A mouseover for this feature's label. featureRange elements can override this setting using their own mouseover attribute. Be sure to escape any special XML characters that appear in the mouseover text. See the XML Overview. text -
opacity Sets the opacity of this feature. featureRange elements can override this setting using their own opacity attribute. real between 0.0 and 1.0, with 0.0 being completely transparent. 1.0
proportionOfThickness Sets the proportion of the featureSlot thickness used when this feature is drawn. featureRange elements can override this setting using their own proportionOfThickness attribute. real between 0.0 and 1.0, with 1.0 being the thickest. 1.0
radiusAdjustment Specifies where this feature should be placed relative to the featureSlot (it adjusts the radius of the arc used to draw the feature). This attribute only has an effect when the proportionOfThickness attribute is set to a value less than 1.0. featureRange elements can override this setting using their own radiusAdjustment attribute. real between 0.0 and 1.0, with 0.0 being at the edge of the featureSlot closest to the center of the backbone circle. 0.0
showLabel Specifies whether or not this feature's label should be drawn. featureRange elements can override this setting using their own showLabel attribute. The parent cgview element can override this value using its globalLabel attribute. true - the labels should be drawn.
false - the labels should not be drawn.
true
showShading Specifies whether or not this feature should be drawn with shading. This setting overrides the showShading value of the parent featureSlot element. featureRange elements can override this setting using their own showShading attribute. true - shading should be used.
false - shading should not be used.
Inherited from the showShading value of the parent featureSlot element.

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: