SpreadsheetView
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Provided by the spreadsheet-view plugin. View source.
Shows a VCF, BED, BEDPE or STAR-Fusion file as a filterable table whose rows open their genomic location in a new view.
Example usage
Hand-authored under defaultSession.views, with every setting written
directly on the view object. uri loads a VCF, BED, BEDPE or STAR-Fusion file
straight into the grid, skipping the import form; assembly names the
assembly that resolves genomic coordinates in the rows:
{
type: 'SpreadsheetView',
assembly: 'hg38',
uri: 'https://example.com/variants.vcf.gz',
fileType: 'VCF',
}Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
typetype: types.literal('SpreadsheetView') | |
heightheight: types.stripDefault(types.number, defaultHeight) | the height of the sheet in pixels |
| hideVerticalResizeHandle | chrome switch, for an embed that sizes the view itself |
| drilldownTracks | trackIds the views a row opens start with, beside the loaded file's own track: the tumor and normal alignments, a coverage track, an assembly's synteny track |
| importWizard | |
spreadsheetspreadsheet: types.maybe(Spreadsheet()) | |
| launch | transient launch keys lifted off the view object, applied on attach and then cleared; author them directly on the view |
3 inherited properties from one model
From BaseViewModel: id, displayName, minimized
Volatiles
| Member | Description |
|---|---|
widthnumber |
1 inherited volatile from one model
From BaseViewModel: bodyMounted
Getters
| Member | Description |
|---|---|
| pendingLaunch | the launch keys still waiting to be applied |
showLoadingboolean | true while the file loads, which ViewContainer publishes as data-view-phase; the import form stays on screen under a spinner |
drilldownTrackIdsstring[] | every track a row's drill-down opens with, the loaded file's own first |
4 inherited getters from one model
From BaseViewModel: rendersDisplays, effectiveBodyMounted, ownTracks, ownViews
Methods
| Member | Description |
|---|---|
Actions
| Member | Description |
|---|---|
setHeight(newHeight: number) => number | |
resizeHeight(distance: number) => number | returns the distance applied, which minHeight can cut short |
displaySpreadsheet(spreadsheet?: SpreadsheetSnapshot) => void | show a parsed sheet. One with the same columns as the sheet it replaces, as a reloaded session's re-fetch is, keeps that sheet's column visibility, filters and search |
| setLaunch | |
setError(error: unknown) => void | a failed launch's error, shown in the import form's banner |
setDrilldownTracks(trackIds: string[]) => void | |
registerImportedTrack(assemblyName: string) => void | Put the loaded file in the session as a track, so the views a row opens show the records it came from. Idempotent: a session that already has a track for the file reuses it. Nothing removes the track, since the views that opened it outlive the sheet; the reader closes it like any session track. |
| loadSpreadsheet | fetch, parse and show the wizard's file: the one path a launch, a session reload and the Open button all take |
returnToImportForm() => void | drop the sheet and its cached location, so a session reload does not fetch the dismissed file again |
| applyInit | point the import wizard at a launch's file and load it; without a uri or an assembly, only seed the import form with what it names |
4 inherited actions from one model
From BaseViewModel: setDisplayName, setWidth, setBodyMounted, setMinimized
Related links
- Docs: URL query parameter API