Skip to content

CGView XML

Aaron Petkau edited this page Sep 3, 2020 · 3 revisions

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

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.

<?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 to 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.

Clone this wiki locally