Interface for reading and writing data to and from CGView
Name | Type | Description |
---|---|---|
viewer |
Viewer |
Viewer |
Members
-
viewerViewer
-
Get the viewer.
Methods
-
Download the map sequence in FASTA format.
Name Type Default Description fastaId
String ID line for FASTA (i.e. text after '>')
filename
String sequence.fa Name for saved file
options
Object Options for FASTA (see Sequence.asFasta)
-
Download the currently visible map as a PNG image.
Name Type Default Description width
Number Width of image
height
Number Height of image
filename
String image.png Name to save image file as
-
Download the map as a JSON object
Name Type Default Description filename
String cgview.json Name for saved file
options
Object Options passed to toJSON
-
Download the currently visible map as a SVG image. Requires SVGContext external dependency: https://github.com/zenozeng/svgcanvas
Name Type Default Description filename
String image.svg Name to save image file as
-
Return the currently visible map as a SVG string. Requires SVGCanvas external dependency: https://github.com/zenozeng/svgcanvas
-
Load data from object literal or JSON string (Format details). The map data must be contained within a top level "cgview" property. Removes any previous viewer data and overrides options that are already set.
Name Type Description data
Object JSON string or Object Literal
-
Return the CGView map as a JSON object. The JSON can later be loaded using loadJSON. See the JSON page for details on the JSON structure.
-
Update old CGView JSON formats to the current version. The map data must be contained within a top level "cgview" property. This method will continue to call itself until the JSON is updated to the latest version.
Name Type Description data
Object Object Literal