CGView is a circular genome viewergraphing utility. You can give it features encoded in XML files, and it generates a display of those features along a circular genome fragment.
...
In XML, this has the basic form:
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="ISO-8859-1"?>
<cgview backboneRadius="160" sequenceLength="10000" height="600" width="600">
<legend position="upper-right">
<legendItem text="Promoter" drawSwatch="true" swatchColor="green" />
<legendItem text="Terminator" drawSwatch="true" swatchColor="red" />
</legend>
<featureSlot strand="direct">
<feature color="green" decoration="clockwise-arrow" label="a promoter">
<featureRange start="500" stop="900" />
</feature>
</featureSlot>
<featureSlot strand="reverse">
<feature color="red" decoration="arc" label="a terminator">
<featureRange start="8500" stop="8800" />
</feature>
</featureSlot>
</cgview>
|
Basic Attributes
Here are some quick summaries of some useful attributes. Complete information is available from the CGView documentation.
featureSlot
Define a circular track in the graph.
strand
direct or reverse affects the direction of arrows, and whether features are drawn on the inside or outside of the backbone circle.
feature
Define a feature in the graph.
color
red, blue, green, purple are easy choices, but you can also use RGB values with something like rgb(0,225, 0).
decoration
arc, clockwise-arrow, counterclockwise-arrow
proportionOfThickness
real number between 0 and 1.0 changes the thickness of the feature.
radiusAdjustment
real number between 0 and 1.0 adjusts the radius at which the feature is drawn. 0 draws the feature as close to the backbone circle as possible, 0.5 draws the feature in the middle of the featureSlot.
featureRange
Where feature begins and ends (and there can be more than one featureRange
per feature
).
start, stop
integers between 0 and the sequence length. Each featureRange
needs start
and stop
coordinates.
color, decoration, proportionOfThickness, radiusAdjustment
have the same meaning as for a feature
, and setting these values for a featureRange
overrides the values in the encompassing feature
.
Helper Scripts
Here's a quick Bash script that takes files in XML format representing featureSlot elements, and combines them into an XML file for CGView.
Code Block | ||
---|---|---|
| ||
#!/bin/bash
cp header.xml cg3.xml
cp header_nogenelabels.xml cg3.xml
cat "$@" >> cg3.xml
echo "</cgview>" >> cg3.xml
cgview -i cg3.xml -o map.jpg -f jpg
|
This code depends on the following header file (which should be modified to fit the current use):
Expand | |||||
---|---|---|---|---|---|
| hello world
| ||||
|