Base1DView
Note: this document is automatically generated from mobx-state-tree objects in our source code. See Core concepts and intro to pluggable elements for more info
Also note: this document represents the state model API for the current released version of jbrowse. If you are not using the current version, please cross reference the markdown files in our repo of the checked out git tag
Links
Docs
used in non-lgv view representations of a 1d view e.g. the two axes of the dotplot use this
Base1DView - Properties
property: id
// type signature
IOptionalIType<ISimpleType<string>, [undefined]>
// code
id: ElementId
property: displayedRegions
// type signature
IOptionalIType<IType<Region[], Region[], Region[]>, [undefined]>
// code
displayedRegions: types.optional(types.frozen<IRegion[]>(), [])
property: bpPerPx
// type signature
number
// code
bpPerPx: 0
property: offsetPx
// type signature
number
// code
offsetPx: 0
property: interRegionPaddingWidth
// type signature
IOptionalIType<ISimpleType<number>, [undefined]>
// code
interRegionPaddingWidth: types.optional(types.number, 0)
property: minimumBlockWidth
// type signature
IOptionalIType<ISimpleType<number>, [undefined]>
// code
minimumBlockWidth: types.optional(types.number, 0)
Base1DView - Getters
getter: width
// type
number
getter: assemblyNames
// type
any[]
getter: displayedRegionsTotalPx
// type
number
getter: maxOffset
// type
number
getter: minOffset
// type
number
getter: totalBp
// type
number
getter: dynamicBlocks
// type
BlockSet
getter: staticBlocks
// type
BlockSet
getter: currBp
// type
number
Base1DView - Methods
method: pxToBp
// type signature
pxToBp: (px: number) => { coord: number; index: number; refName: string; oob: boolean; assemblyName: string; offset: number; start: number; end: number; reversed?: boolean; }
method: bpToPx
// type signature
bpToPx: ({ refName, coord, regionNumber, }: { refName: string; coord: number; regionNumber?: number; }) => number
Base1DView - Actions
action: setDisplayedRegions
// type signature
setDisplayedRegions: (regions: Region[]) => void
action: setBpPerPx
// type signature
setBpPerPx: (val: number) => void
action: setVolatileWidth
// type signature
setVolatileWidth: (width: number) => void
action: setFeatures
// type signature
setFeatures: (features: Feature[]) => void
action: showAllRegions
this makes a zoomed out view that shows all displayedRegions that makes the overview bar square with the scale bar
// type signature
showAllRegions: () => void
action: zoomOut
// type signature
zoomOut: () => void
action: zoomIn
// type signature
zoomIn: () => void
action: zoomTo
// type signature
zoomTo: (bpPerPx: number, offset?: number) => number
action: scrollTo
// type signature
scrollTo: (offsetPx: number) => number
action: centerAt
// type signature
centerAt: (coord: number, refName: string, regionNumber: number) => void
action: scroll
note: the scroll is clamped to keep the view on the main screen
// type signature
scroll: (distance: number) => number
action: moveTo
offset is the base-pair-offset in the displayed region, index is the index of the displayed region in the linear genome view
// type signature
moveTo: (start?: BpOffset, end?: BpOffset) => void