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 fastaIdString ID line for FASTA (i.e. text after '>')
filenameString sequence.fa Name for saved file
optionsObject Options for FASTA (see Sequence.asFasta)
-
Download the currently visible map as a PNG image.
Name Type Default Description widthNumber Width of image
heightNumber Height of image
filenameString image.png Name to save image file as
-
Download the map as a JSON object
Name Type Default Description filenameString cgview.json Name for saved file
optionsObject 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 filenameString 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 dataObject 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 dataObject Object Literal