# SvInspectorView

Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Provided by the `sv-inspector` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/sv-inspector/src/SvInspectorView/model.ts).

## Example usage

```js
{
  type: 'SvInspectorView',
  assembly: 'hg38',
  uri: 'https://example.com/sv.vcf.gz',
  fileType: 'VCF',
}
```

Shows a file of structural variants as a table beside a circular view that
draws them as chords. The model holds a
[SpreadsheetView](../spreadsheetview) and a
[CircularView](../circularview) side by side, without extending either.

Each section ends with the members a composed model contributes, linked to the page that documents them.

## Properties

| Member | Description |
| --- | --- |
| **id**<br><code>id: ElementId</code> |  |
| **type**<br><code>type: types.literal('SvInspectorView')</code> |  |
| **height**<br><code>height: types.stripDefault(types.number, defaultHeight)</code> | height of the whole view in pixels |
| **onlyDisplayRelevantRegionsInCircularView**<br><code>onlyDisplayRelevantRegionsInCircularView: types.stripDefault( types.boolean, false, )</code> | draw only the chromosomes the visible rows touch |
| **spreadsheetWidthFraction**<br><code>spreadsheetWidthFraction: types.stripDefault(types.number, 0.66)</code> | share of the view's width given to the spreadsheet |
| **spreadsheetView**<br><code>spreadsheetView: types.optional(SpreadsheetModel, () =&gt; SpreadsheetModel.create({ type: 'SpreadsheetView', hideVerticalResizeHandle: true, }), )</code> |  |
| **circularView**<br><code>circularView: types.optional(CircularModel, () =&gt; CircularModel.create({ type: 'CircularView', hideVerticalResizeHandle: true, disableImportForm: true, }), )</code> |  |
| **launch**<br><code>launch: types.frozen&lt; LaunchInput&lt;SvInspectorViewCommands&gt; &#124; undefined &gt;()</code> | transient launch keys, forwarded to the sheet on attach and cleared; author them directly on the view |

2 inherited properties from one model:

From [BaseViewModel](../baseviewmodel): [`displayName`](../baseviewmodel#property-displayname), [`minimized`](../baseviewmodel#property-minimized)


## Volatiles

| Member | Description |
| --- | --- |
| **SpreadsheetViewReactComponent**<br><code>ViewComponentType</code> |  |
| **CircularViewReactComponent**<br><code>ViewComponentType</code> |  |

2 inherited volatiles from one model:

From [BaseViewModel](../baseviewmodel): [`width`](../baseviewmodel#volatile-width), [`bodyMounted`](../baseviewmodel#volatile-bodymounted)


## Getters

| Member | Description |
| --- | --- |
| **pendingLaunch**<br><code>LaunchInput&lt;SvInspectorViewCommands &amp; { unknown?: Record&lt;string, unknown&gt; &#124; undefined; malformed?: Record&lt;string, unknown&gt; &#124; undefined; legacyInit?: boolean &#124; undefined; } &amp; IStateTreeNode&lt;IType&lt;LaunchInput&lt;SvInspectorViewCommands&gt; &#124; undefined, LaunchInput&lt;SvInspectorViewCommands&gt; &#124; undefined, LaunchInput&lt;SvInspectorViewCommands&gt; &#124; undefined&gt;&gt;&gt; &#124; undefined</code> |  |
| **currentAssembly**<br><code>(ModelInstanceTypeProps&lt;…&gt; &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; { getCanonicalRefName2(refName: string): string; isValidRefName(refName: string): boolean; } &amp; { isCircularRefName(refName: string): boolean; getRefNamePosition(refName: string): number &#124; undefined; getAliasesForRefName(refName: string): string[]; getRefNameMapForAdapter(adapterConf: AdapterConf, options: BaseOptions): Promise&lt;…&gt;; getRefNameMismatch(adapterCacheKey: string): RefNameMismatch &#124; undefined; } &amp; IStateTreeNode&lt;…&gt;) &#124; undefined</code> |  |
| **assemblyName**<br><code>string &#124; undefined</code> |  |
| **showCircularView**<br><code>boolean</code> | false while the sheet shows its import form |
| **showLoading**<br><code>boolean</code> | both halves' loading state; the circle counts only while shown |
| **ownViews**<br><code>((ModelInstanceTypeProps&lt;…&gt; &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; IStateTreeNode&lt;…&gt;) &#124; (ModelInstanceTypeProps&lt;…&gt; &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; {…} &amp; { afterCreate(): void; beforeDestroy(): void; afterAttach(): void; } &amp; { tracksMenuItem(): MenuItem; } &amp; { readonly legendSpec: LegendSpec; legendSpecIn(palette?: JBrowsePalette &#124; undefined): LegendSpec; menuItems(): MenuItem[]; } &amp; IStateTreeNode&lt;…&gt;))[]</code> | an unshown circle never initializes, so it would read as loading forever |
| **features**<br><code>SimpleFeatureSerialized[]</code> | the records of the rows the sheet's filters leave |
| **allFeatures**<br><code>SimpleFeatureSerialized[]</code> | every record of the sheet, which the chord track holds; filters narrow it through visibleChordIds rather than rebuilding the track |
| **visibleChordIds**<br><code>string[] &#124; undefined</code> | undefined while no filter narrows the sheet |
| **canonicalFeatureRefNameSet**<br><code>Set&lt;string&gt;</code> | every canonical refName the visible features' chords land on, both ends included |
| **circularDisplayedRegions**<br><code>BasicRegion[] &#124; undefined</code> | never narrowed to nothing, which would draw an empty circle |
| **effectiveSpreadsheetWidthFraction**<br><code>number</code> |  |
| **subviewWidths**<br><code>{ spreadsheet: number; circular: number; }</code> |  |
| **highlightedChordIds**<br><code>string[] &#124; undefined</code> | the records of the selected record's event, which the circle keeps at full strength while it dims the rest |
| **variantTrackId**<br><code>string</code> |  |
| **featuresCircularTrackConfiguration**<br><code>{ type: string; trackId: string; name: string; adapter: { type: string; features: SimpleFeatureSerialized[]; }; assemblyNames: string[]; displays: { type: string; displayId: string; onChordClick: string; color: { field: string; }; opacity: number; }[]; } &#124; undefined</code> |  |

3 inherited getters from one model:

From [BaseViewModel](../baseviewmodel): [`rendersDisplays`](../baseviewmodel#getter-rendersdisplays), [`effectiveBodyMounted`](../baseviewmodel#getter-effectivebodymounted), [`ownTracks`](../baseviewmodel#getter-owntracks)


## Methods

| Member | Description |
| --- | --- |
| **menuItems**<br><code>() =&gt; { label: string; icon: OverridableComponent&lt;SvgIconTypeMap&lt;{}, "svg"&gt;&gt; &amp; { muiName: string; }; onClick: () =&gt; void; }[]</code> |  |

## Actions

| Member | Description |
| --- | --- |
| **setHeight**<br><code>(newHeight: number) =&gt; number</code> |  |
| **setOnlyDisplayRelevantRegionsInCircularView**<br><code>(val: boolean) =&gt; void</code> |  |
| **resizeSpreadsheetWidth**<br><code>(distance: number) =&gt; void</code> | accumulates onto the fraction, not the rounded spreadsheetView.width, so the divider doesn't creep a pixel per drag frame |
| **setLaunch**<br><code>(launch?: LaunchInput&lt;SvInspectorViewCommands&gt; &#124; undefined) =&gt; void</code> |  |
| **resizeHeight**<br><code>(distance: number) =&gt; number</code> |  |

4 inherited actions from one model:

From [BaseViewModel](../baseviewmodel): [`setDisplayName`](../baseviewmodel#action-setdisplayname), [`setWidth`](../baseviewmodel#action-setwidth), [`setBodyMounted`](../baseviewmodel#action-setbodymounted), [`setMinimized`](../baseviewmodel#action-setminimized)


