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 |
|---|---|
type"SpreadsheetView" |
Always "SpreadsheetView", the name a snapshot selects this model by. |
heightnumber · default 440 |
the height of the sheet in pixels |
hideVerticalResizeHandleboolean · default false |
chrome switch, for an embed that sizes the view itself |
drilldownTracksstring[] · default [] |
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 |
importWizardSpreadsheetImportWizard · default ImportWizardModel.create() |
|
spreadsheetSpreadsheetViewSpreadsheet | undefined |
|
launchLaunchInput<SpreadsheetViewCommands> | undefined |
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 |
|
rowsTrackIdstring |
the trackId a selected row is tagged with: the track drawing these rows when one does (the SV inspector's chord track), else this view's id, which no track shares |
2 inherited volatiles from one model
From BaseViewModel: problems, 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 |
|---|---|
() => MenuItem[] |
empty while the import form is what shows |
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, search and sort |
setLaunch(launch?: LaunchInput<SpreadsheetViewCommands>) => void |
|
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 |
setRowsTrackId(trackId: string) => void |
5 inherited actions from one model
From BaseViewModel: addProblem, setDisplayName, setWidth, setBodyMounted, setMinimized
Related links
- Docs: URL query parameter API