BaseRootModel
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Built into JBrowse core. View source.
Holds the loaded config, the session, the assembly manager and the RPC manager. Every JBrowse product's root model composes this one.
Properties
| Member | Description |
|---|---|
jbrowsejbrowse: jbrowseModelType | jbrowse is a mapping of the config.json into the in-memory state tree |
sessionsession: types.maybe(sessionModelType) | session encompasses the currently active state of the app, including views open, tracks open in those views, etc. |
sessionPathsessionPath: types.stripDefault(types.string, '') | |
| assemblyManager |
Volatiles
| Member | Description |
|---|---|
rpcManagerRpcManager | |
adminModeboolean | |
errorunknown | |
textSearchManagerTextSearchManager | |
pluginManagerPluginManager |
Actions
| Member | Description |
|---|---|
setError(error: unknown) => void | |
setSession(sessionSnapshot?: any) => void | Sets the active session. Remaps any legacy display type names (e.g. LinearPileupDisplay → LinearAlignmentsDisplay), drops nodes whose pluggable type this build has no plugin for (see pruneUnbuildableNodes), then walks the resulting MST tree to drop open tracks whose config can't hydrate so shared sessions still load when referencing tracks that no longer exist. Both kinds of drop are surfaced to the user via a snackbar. If filtering throws, the previous session is restored. |
setDefaultSession() => void | Starts a new session from the config's defaultSession. An id in it (a pasted session export carries one) is dropped, since sessions are autosaved by id and each new one would otherwise overwrite the last. |
setSessionPath(path: string) => void | |
renameCurrentSession(newName: string) => void |