Skip to main content

@anocca/sequence-viewer-utils

Home > @anocca/sequence-viewer-utils

Contains utilities, types and constants used by all @anocca/sequence-viewer- packages

Enumerations

EnumerationDescription
SeqAnnotationDirectionsEnumThe direction of an annotation

Functions

FunctionDescription
getFont(size, weight)Creates a font string based on fontSize and fontWeight
getRatio(context)Get the device pixel ratio
scaleBuffer(canvas, width, height)Scale the canvas according to the device pixel ratio

Type Aliases

Type AliasDescription
AnnotationAnnotation
AnnotationFormPropsProps for an AnnotationForm component
AnnotationsList of annotations
ChromatogramDataChromatogram data to render the chromatogram
CircularCameraProgressThe progress on zoom, angle and radius between 0 and 1 inclusive
CircularSelection

Sequence selection defines [start, end] where start is the tail and end is the head.

lets say we have sequence of length 3000 and annotation of 4 bp length locations:

reverse: [10 - 6], antiClockwise: true,

reverse(over the origin): [2 - 2998], antiClockwise: true,

forward: [6 - 10], antiClockwise: false,

forward(over the origin): [2998 - 2], antiClockwise: false

DrawFunctionThe draw function, e.g. drawLinear or drawCircular that paints the canvas element
MatrixA transform matrix
RenderDataFrequently updated data for drawCircular and drawLinear
SearchResultSearch result
SelectionRangeSelection range
SequenceControllerRefTo programatically call onClickAnnotation to select annotation in the sequence controller