@jbrowse/plugin-alignments
Auto-generated from exported functions tagged #api in the source. See
imports and re-exports for how to
import these from a plugin.
alignmentMarkAlpha
Each insertion's width in px and each insertion's, deletion's, mismatch's
and clip's alpha as the pileup draws them at pxPerBp, through the
shaders' generated twins, for a host that draws the marks at its figure's
scale. fade is a mark's fade column, length its length in bp (a
deletion's end - start) and quality a mismatch's, 255 where the read
has none. A column may be a number, for one mark. featureHeight is
readPitch.featureHeight, fadeLowFrequency the display's
pileup.fadeLowFrequency, and mismatchOpacity its
pileup.mismatches.encoding.opacity as a config writes it; each of the
three takes the pileup config's default when left out.
- An insertion's
widthPxisinsertionBarWidthPx, and itsalphainsertionSizeAlphatimes, underLONG_INSERTION_MIN_LENGTH,frequencyFadeGateoverpxPerBpsquared. - A deletion's
alphaissizeAlphaof its width in px timesfrequencyFadeGateover that width squared. - A mismatch's
alphaisqualityFadetimesfrequencyFadeGateoverpxPerBp, and a clip's that gate alone.qualitymay be left out whilemismatchOpacitynames no field.
// type signature
({ pxPerBp, featureHeight, fadeLowFrequency, mismatchOpacity, insertions, deletions, mismatches, clips, }: { pxPerBp: number; featureHeight?: number | undefined; fadeLowFrequency?: boolean | undefined; mismatchOpacity?: PileupMismatchesOpacitySnapshot | undefined; insertions?: {…} | undefined; deletions?: {…} | undefined; mismatches?: {…} | undefined; clips?: { fade: MarkColumn; } | undefined; }) => { insertions: { widthPx: number[]; alpha: number[]; }; deletions: { alpha: number[]; }; mismatches: { alpha: number[]; }; clips: { alpha: number[]; }; }alignmentTables
A region's reads, or several regions', as the alignments display fetches,
filters, lays out and colors them, as tables: the worker's reads,
mismatches, gaps, insertions, clips, modifications, per-base qualities,
coverage and splice junctions, each read on the row the display's pileup
layout gives it and in the color the display's encoding.color paints it,
with the key the display shows: legend, and ramps, its color bars
(rampKeyOf). Under a facet each section lays out separately, every row
has a section, and sections lists them in stacking order;
ungrouped, there is one section, labelled ''. Several regions lay out as
the display lays out a view's regions, on one set of rows: a read crossing
regions is listed in each, under one key and on one row, and every row
names its region's index. warnings names what the config asked for
that the tables dropped. For a host that draws them itself, such as R
through V8. The adapters must be registered on pluginManager
(registerAlignmentsAdapters).
// type signature
(pluginManager: PluginManager, { adapterConfig, sequenceAdapter, regions, display, refNames, byteLimit, spanLimit, }: AlignmentTablesArgs) => Promise<{…}>isLinearAlignmentsDisplay
Whether a track's display is the reads display, for a host that reaches it
through view.getTrack(id)?.activeDisplay to drive its own controls.
// type signature
(display: unknown) => display is LinearAlignmentsDisplayModelreferenceSequence
A region of the reference, as the sequence adapter a track's assembly names reads it: the bases as one string, for a host drawing them under a pileup.
// type signature
(pluginManager: PluginManager, { sequenceAdapter, region, }: { sequenceAdapter: Record<string, unknown>; region: { refName: string; start: number; end: number; }; }) => Promise<string>