CGView XML

Input can be provided to GView using the same XML format used by CGView. The XML file format allows the creation of a custom genome map with full control over the features being displayed and the text used for labels. This backwards compatibility allows XML files created for CGView to become fully interactive through GView.

Opening XML Files

gview-open-1_6.png

To open a CGView XML file in GView, the Open Files dialog box can be used. This can be accessed by double clicking on the gview.jar file or by launching GView through webstart and going to File > Open (see the Getting Started section for more information). Once this window is launched, the CGView XML file can be loaded by clicking on the Browse button in the Sequence Data files section. Once this file is selected, the map can be built by clicking on the Build Map button (no other files need to be supplied).

Example CGView XML

This is the map generated by the example XML on the CGView XML website.
cgview_xml_output.png
<?xml version="1.0" encoding="ISO-8859-1"?>
 <cgview backboneRadius="160" sequenceLength="10000" height="600" width="600">
  <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>
 <legend position="upper-right">
  <legendItem text="Promoter" drawSwatch="true" swatchColor="green" />
  <legendItem text="Terminator" drawSwatch="true" swatchColor="red" />
 </legend>
</cgview>

For information on creating an XML file for use in GView, see the instructions on the CGView XML page.
Note: The root element of the XML file must still be a cgview element; a gview element will not be parsed properly by GView.
 
Contact: Aaron Petkau, Eric Marinier, Matthew Stuart-Edwards at gview@phac-aspc.gc.ca