Create a Contig
Name | Type | Description |
---|---|---|
viewer |
Viewer |
The viewer |
options |
Object |
Attributes used to create the contig |
meta |
Object |
optional
User-defined Meta data to add to the contig |
Extends
Members
-
canvasCanvas
-
Get the canvas.
-
colorColor
-
Get or set the color. When setting the color, a string representing the color or a
Color
object can be used. For details seeColor
. -
hasSeqBoolean
-
Return true of this contig has a sequence
-
indexNumber
-
Get the contig index (base-1) in relation to all the other contigs.
-
isMapContigNumber
-
Returns true if this contig is the mapContig
-
layoutLayout
-
Get the layout.
-
lengthNumber
-
Get or set the sequence length. If the seq property is set, the length can not be adjusted.
-
lengthOffsetNumber
-
Get the length of all the contigs before this one.
-
mapRangeCGRange
-
Get the range of the contig in relation to the entire map. The range start is the total length of the contigs before this one plus 1. The range stop is the total length of the contigs before this one plus this contigs length.
-
mapStartNumber
-
Get the start position (bp) of the contig in relation to the entire map. The start is the total length of the contigs before this one plus 1.
-
mapStopNumber
-
Get the stop position (bp) of the contig in relation to the entire map. The stop is the total length of the contigs before this one plus this contigs length.
-
metaBoolean
-
Get or Set the meta data of this object. See the meta data tutorial for details.
-
nameString
-
Get or set the contig name. When setting a name, if it's not unique it will be appended with a number. For example, if 'my_name' already exists, it will be changed to 'my_name-2'. Empty names will be changed to 'Unknown'.
-
orientationString
-
Get or set the contig orientation. Value must be '+' or '-'. Flipping the orienation will reverse complement the contig sequence and adjust all the features on this contig.
-
seqString
-
Get or set the seqeunce.
-
sequenceString
-
Get the sequence.
-
viewerViewer
-
Get the viewer.
-
visibleBoolean
-
Get or Set the visibility of this object.
Methods
-
Returns sequence of this contig in fasta format
-
inherited deleteFromObjects()
-
Remove the object from Viewer.objects
-
Returns an CGArray of Features or a single Feature from all the features on this Contig.
Name Type Description term
Integer | String | Array See CGArray.get for details.
Returns:
Type Description CGArray -
Move this contig to a new index in the array of Sequence contigs.
Name Type Description newIndex
Number New index for this caption (0-based)
-
Zoom and pan map to show the contig
Name Type Description duration
Number Length of animation
ease
Object The d3 animation ease [Default: d3.easeCubic]
-
Remove the Contig from the Sequence
-
Reverse complement the sequence of this contig
-
Returns JSON representing the object
-
Return the class name as a string.
Returns:
Type Description String - 'Contig'
-
Update contig attributes. See updating records for details.
Name Type Description attributes
Object Object describing the properties to change