123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746 |
- <!doctype html>
- <html class="default no-js">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>@rcsb/rcsb-saguaro-3d</title>
- <meta name="description" content="Documentation for @rcsb/rcsb-saguaro-3d">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="assets/css/main.css">
- </head>
- <body>
- <header>
- <div class="tsd-page-toolbar">
- <div class="container">
- <div class="table-wrap">
- <div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
- <div class="field">
- <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
- <input id="tsd-search-field" type="text" />
- </div>
- <ul class="results">
- <li class="state loading">Preparing search index...</li>
- <li class="state failure">The search index is not available</li>
- </ul>
- <a href="index.html" class="title">@rcsb/rcsb-saguaro-3d</a>
- </div>
- <div class="table-cell" id="tsd-widgets">
- <div id="tsd-filter">
- <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
- <div class="tsd-filter-group">
- <div class="tsd-select" id="tsd-filter-visibility">
- <span class="tsd-select-label">All</span>
- <ul class="tsd-select-list">
- <li data-value="public">Public</li>
- <li data-value="protected">Public/Protected</li>
- <li data-value="private" class="selected">All</li>
- </ul>
- </div>
- <input type="checkbox" id="tsd-filter-inherited" checked />
- <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
- <input type="checkbox" id="tsd-filter-externals" checked />
- <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
- <input type="checkbox" id="tsd-filter-only-exported" />
- <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
- </div>
- </div>
- <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
- </div>
- </div>
- </div>
- </div>
- <div class="tsd-page-title">
- <div class="container">
- <ul class="tsd-breadcrumb">
- <li>
- <a href="globals.html">Globals</a>
- </li>
- </ul>
- <h1>@rcsb/rcsb-saguaro-3d</h1>
- </div>
- </div>
- </header>
- <div class="container container-main">
- <div class="row">
- <div class="col-8 col-content">
- <div class="tsd-panel tsd-typography">
- <a href="#rcsb-saguaro-3d" id="rcsb-saguaro-3d" style="color: inherit; text-decoration: none;">
- <h1>rcsb-saguaro-3D</h1>
- </a>
- <p>RCSB Saguaro Web 3D is an open-source library built on the top of the <a href="https://rcsb.github.io/rcsb-saguaro">RCSB Saguaro 1D Feature Viewer</a>
- and <a href="https://github.com/rcsb/rcsb-Molstar">RCSB Molstar</a> designed to display protein features at the <a href="https://www.rcsb.org">RCSB Web Site</a>.
- The package collects protein annotations from the <a href="https://1d-coordinates.rcsb.org">1D Coordinate Server</a>
- and the main <a href="https://data.rcsb.org">RCSB Data API</a> and generates Protein Feature Summaries.
- The package allows access to RCSB Saguaro and Molstar methods to add or change the displayed data. </p>
- <div id="pfv"></div>
- <script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
- <script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
- <script crossorigin src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-3d@1.0.0/build/dist/app.js"></script>
- <script type="text/javascript">
- var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
- };
- var rowConfigChainA = [
- {
- trackId: "sequenceTrack",
- trackHeight: 20,
- trackColor: "#F9F9F9",
- displayType: "sequence" /* SEQUENCE */,
- nonEmptyDisplay: true,
- rowTitle: "CHAIN A",
- trackData: [
- {
- begin: 1,
- value: "CGVPAIQPVLSGLSRIVNGEEAVPGSWPWQVSLQDKTGFHFCGGSLINENWVVTAAHCGVTTSDVVVAGEFDQGSSSEKIQKLKIAKVFKNSKYNSLTINNDITLLKLSTAASFSQTVSAVCLPSASDDFAAGTTCVTTGWGLTRYTNANTPDRLQQASLPLLSNTNCKKYWGTKIKDAMICAGASGVSSCMGDSGGPLVCKKNGAWTLVGIVSWGSSTCSTSTPGVYARVTALVNWVQQTLAAN"
- }
- ]
- }, {
- trackId: "blockTrack",
- trackHeight: 20,
- trackColor: "#F9F9F9",
- displayType: "block" /* BLOCK */,
- displayColor: "#76ae91",
- rowTitle: "FEATURE",
- trackData: [{
- begin: 20,
- end: 25
- }, {
- begin: 150,
- end: 160
- }]
- }
- ];
- var rowConfigChainB = [
- {
- trackId: "sequenceTrack",
- trackHeight: 20,
- trackColor: "#F9F9F9",
- displayType: "sequence" /* SEQUENCE */,
- nonEmptyDisplay: true,
- rowTitle: "CHAIN B",
- trackData: [
- {
- begin: 1,
- value: "TEFGSELKSFPEVVGKTVDQAREYFTLHYPQYDVYFLPEGSPVTLDLRYNRVRVFYNPGTNVVNHVPHVG"
- }
- ]
- }, {
- trackId: "blockTrack",
- trackHeight: 20,
- trackColor: "#F9F9F9",
- displayType: "block" /* BLOCK */,
- displayColor: "#f17070",
- rowTitle: "FEATURE",
- trackData: [{
- begin: 20,
- end: 50
- }]
- }
- ];
- var fvConfigChainA = {
- boardId: "1acb.A_board",
- boardConfig: {
- range: {
- min: 1,
- max: 245
- },
- disableMenu:true,
- rowTitleWidth: 80,
- trackWidth: 670,
- includeAxis: true
- },
- rowConfig: rowConfigChainA,
- sequenceSelectionChangeCallback: function (plugin, selectorManager, sequenceRegion) {
- selectorManager.clearSelection("select", { modelId: "1acb_board", labelAsymId: "A" });
- plugin.clearSelection("select", { modelId: "1acb_board", labelAsymId: "A" });
- if (sequenceRegion.length > 0) {
- var regions = sequenceRegion.map(function (r) {
- var _a;
- return ({
- modelId: "1acb_board",
- labelAsymId: "A",
- region: { begin: r.begin, end: (_a = r.end) !== null && _a !== void 0 ? _a : r.begin, source: "sequence" }
- });
- });
- selectorManager.addSelectionFromMultipleRegions(regions, "select");
- plugin.select(regions.map(function (r) { return (__assign(__assign({}, r), { begin: r.region.begin, end: r.region.end })); }), "select", "add");
- }
- else {
- plugin.resetCamera();
- }
- },
- sequenceElementClickCallback: function (plugin, selectorManager, d) {
- var _a;
- if (d != null)
- plugin.cameraFocus("1acb_board", "A", d.begin, (_a = d.end) !== null && _a !== void 0 ? _a : d.begin);
- },
- sequenceHoverCallback: function (plugin, selectorManager, elements) {
- if (elements == null || elements.length == 0)
- plugin.clearSelection("hover");
- else
- plugin.select(elements.map(function (e) {
- var _a;
- return ({
- modelId: "1acb_board",
- labelAsymId: "A",
- begin: e.begin,
- end: (_a = e.end) !== null && _a !== void 0 ? _a : e.begin
- });
- }), "hover", "set");
- },
- structureSelectionCallback: function (plugin, pfv, selection) {
- var sel = selection.getSelectionWithCondition("1acb_board", "A", "select");
- if (sel == null) {
- pfv.clearSelection("select");
- plugin.resetCamera();
- }
- else {
- pfv.setSelection({ elements: sel.regions, mode: "select" });
- }
- },
- structureHoverCallback: function (plugin, pfv, selection) {
- var sel = selection.getSelectionWithCondition("1acb_board", "A", "hover");
- if (sel == null)
- pfv.clearSelection("hover");
- else
- pfv.setSelection({ elements: sel.regions, mode: "hover" });
- }
- };
- var fvConfigChainB = {
- boardId: "1acb.B_board",
- boardConfig: {
- range: {
- min: 1,
- max: 70
- },
- disableMenu:true,
- rowTitleWidth: 80,
- trackWidth: 670,
- includeAxis: true
- },
- rowConfig: rowConfigChainB,
- sequenceSelectionChangeCallback: function (plugin, selectorManager, sequenceRegion) {
- selectorManager.clearSelection("select", { modelId: "1acb_board", labelAsymId: "B" });
- plugin.clearSelection("select", { modelId: "1acb_board", labelAsymId: "B" });
- if (sequenceRegion.length > 0) {
- var regions = sequenceRegion.map(function (r) {
- var _a;
- return ({
- modelId: "1acb_board",
- labelAsymId: "B",
- region: { begin: r.begin, end: (_a = r.end) !== null && _a !== void 0 ? _a : r.begin, source: "sequence" }
- });
- });
- selectorManager.addSelectionFromMultipleRegions(regions, "select");
- plugin.select(regions.map(function (r) { return (__assign(__assign({}, r), { begin: r.region.begin, end: r.region.end })); }), "select", "add");
- }
- else {
- plugin.resetCamera();
- }
- },
- sequenceElementClickCallback: function (plugin, selectorManager, d) {
- var _a;
- if (d != null)
- plugin.cameraFocus("1acb_board", "B", d.begin, (_a = d.end) !== null && _a !== void 0 ? _a : d.begin);
- },
- sequenceHoverCallback: function (plugin, selectorManager, elements) {
- if (elements == null || elements.length == 0)
- plugin.clearSelection("hover");
- else
- plugin.select(elements.map(function (e) {
- var _a;
- return ({
- modelId: "1acb_board",
- labelAsymId: "B",
- begin: e.begin,
- end: (_a = e.end) !== null && _a !== void 0 ? _a : e.begin
- });
- }), "hover", "set");
- },
- structureSelectionCallback: function (plugin, pfv, selection) {
- var sel = selection.getSelectionWithCondition("1acb_board", "B", "select");
- if (sel == null) {
- pfv.clearSelection("select");
- plugin.resetCamera();
- }
- else {
- pfv.setSelection({ elements: sel.regions, mode: "select" });
- }
- },
- structureHoverCallback: function (plugin, pfv, selection) {
- var sel = selection.getSelectionWithCondition("1acb_board", "B", "hover");
- if (sel == null)
- pfv.clearSelection("hover");
- else
- pfv.setSelection({ elements: sel.regions, mode: "hover" });
- }
- };
- var blockChainA = {
- blockId: "chainA",
- featureViewConfig: [fvConfigChainA]
- };
- var blockChainB = {
- blockId: "chainB",
- featureViewConfig: [fvConfigChainB]
- };
- var blockSelectorElement = function (blockSelectorManager) {
- return (React.createElement("div", null,
- React.createElement("select", { onChange: function (e) {
- blockSelectorManager.setActiveBlock(e.target.value);
- } },
- React.createElement("option", { value: "chainA" }, "Chain A"),
- React.createElement("option", { value: "chainB" }, "Chain B"))));
- };
- var customConfig = {
- blockConfig: [blockChainA, blockChainB],
- blockSelectorElement: blockSelectorElement
- };
- var sequenceConfig = {
- title: undefined,
- subtitle: undefined,
- config: customConfig
- };
- var MolstarConfig = {
- loadConfig: {
- loadMethod: "loadPdbIds",
- loadParams: [{
- pdbId: "1acb",
- id: "1acb_board"
- }]
- },
- pluginConfig: {
- showImportControls: true,
- showSessionControls: false
- },
- };
- document.addEventListener("DOMContentLoaded", function (event) {
- var panel3d = new RcsbFv3D.custom({
- elementId: "pfv",
- structurePanelConfig: MolstarConfig,
- sequencePanelConfig: sequenceConfig,
- cssConfig: {
- overwriteCss:true,
- rootPanel:{
- display:"flex",
- flexDirection:"column-reverse"
- },
- structurePanel:{
- width: 750,
- height: 700
- },
- sequencePanel:{
- width:750,
- marginBottom:5
- }
- },
- });
- panel3d.render();
- });
- </script>
- <a href="#cdn-javascript" id="cdn-javascript" style="color: inherit; text-decoration: none;">
- <h3>CDN JavaScript</h3>
- </a>
- <p><code><script src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-3d@1.0.0/build/dist/app.js" type="text/javascript"></script></code></p>
- <a href="#node-module-instalation" id="node-module-instalation" style="color: inherit; text-decoration: none;">
- <h3>Node Module Instalation</h3>
- </a>
- <p><code>npm install @rcsb/rcsb-saguaro-3d</code></p>
- <a href="#building-amp-running" id="building-amp-running" style="color: inherit; text-decoration: none;">
- <h2>Building & Running</h2>
- </a>
- <a href="#build-app" id="build-app" style="color: inherit; text-decoration: none;">
- <h3>Build app</h3>
- </a>
- <pre><code><span class="hljs-built_in">npm</span> install
- <span class="hljs-built_in">npm</span> run buildApp</code></pre>
- <a href="#build-examples" id="build-examples" style="color: inherit; text-decoration: none;">
- <h3>Build examples</h3>
- </a>
- <pre><code>npm <span class="hljs-builtin-name">run</span> buildExamples</code></pre><p>From the root of the project:</p>
- <pre><code>npx http-server -p PORT-<span class="hljs-built_in">NUMBER</span></code></pre><p>and navigate to <code>localhost:PORT-NUMBER/build/examples/</code></p>
- <a href="#library-documentation" id="library-documentation" style="color: inherit; text-decoration: none;">
- <h3>Library Documentation</h3>
- </a>
- <p>TypeScript full classes documentation can be found <a href="https://rcsb.github.io/rcsb-saguaro-3d/globals.html">here</a>.</p>
- <a href="#main-classes-and-interfaces" id="main-classes-and-interfaces" style="color: inherit; text-decoration: none;">
- <h3>Main Classes and Interfaces</h3>
- </a>
- <a href="#assembly-view" id="assembly-view" style="color: inherit; text-decoration: none;">
- <h4>Assembly view</h4>
- </a>
- <p>Class <strong><code>RcsbFv3DAssembly</code></strong> (<code>src/RcsbFv3D/RcsbFv3DAssembly.tsx</code>) builds a predefined 1D/3D view for PDB assemblies. This method is used in the RCSB PDB web portal
- to display 1D positional features of PDB models (ex: <a href="https://www.rcsb.org/3d-sequence/4HHB">4hhb</a>). Its configuration requires a single PDB Id.
- In addition, <code>additionalConfig</code> allows to configure the feature viewer as describe in rcsb-saguaro-app <a href="https://rcsb.github.io/rcsb-saguaro-app/interfaces/rcsbfvadditionalconfig.html">API</a>.
- This parameter exposes the board configuration through the attribute <code>boardConfig</code> (<a href="https://rcsb.github.io/rcsb-saguaro/interfaces/rcsbfvboardconfiginterface.html">ref</a>).
- The component will be mounted in the html element with id <code>elementId</code>. If there is no html element in the current document,
- a new div element will be added, and the component will be displayed in full screen mode. </p>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> RcsbFv3DAssemblyInterface <span class="hljs-keyword">extends</span> RcsbFv3DAbstractInterface {
- <span class="hljs-attr">elementId</span>: <span class="hljs-string">"htmlElement"</span>,
- <span class="hljs-attr">config</span>: {
- <span class="hljs-attr">entryId</span>: <span class="hljs-built_in">string</span>;
- title?: <span class="hljs-built_in">string</span>;
- subtitle?: <span class="hljs-built_in">string</span>;
- };
- additionalConfig?: RcsbFvAdditionalConfig;
- }</code></pre>
- <p>Source code example can be found in <code>src/examples/assembly/index.ts</code>.</p>
- <a href="#custom-view" id="custom-view" style="color: inherit; text-decoration: none;">
- <h4>Custom view</h4>
- </a>
- <p>Class <strong><code>RcsbFv3DCustom</code></strong> file <code>src/RcsbFv3D/RcsbFv3DCustom.tsx</code> builds a customized view between one or more feature viewers and a single Molstar plugin.
- The configuration interface encodes the parameters for the feature viewers (<code>sequencePanelConfig</code>), the Molstar plugin (<code>structurePanelConfig</code>) and
- their dynamic interaction.</p>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> RcsbFv3DCustomInterface <span class="hljs-keyword">extends</span> RcsbFv3DAbstractInterface {
- <span class="hljs-attr">elementId</span>: <span class="hljs-string">"htmlElement"</span>,
- <span class="hljs-attr">structurePanelConfig</span>: RcsbFvStructureInterface;
- sequencePanelConfig: {
- <span class="hljs-attr">config</span>: CustomViewInterface;
- title?: <span class="hljs-built_in">string</span>;
- subtitle?: <span class="hljs-built_in">string</span>;
- };
- }</code></pre>
- <p><img src="https://raw.githubusercontent.com/rcsb/rcsb-saguaro-3d/master/.github/img/config_img.png" alt="Alt text" title="Custom config schema"></p>
- <a href="#structural-panel" id="structural-panel" style="color: inherit; text-decoration: none;">
- <h5>Structural Panel</h5>
- </a>
- <p>The structural panel configuration <code>structurePanelConfig: RcsbFvStructureInterface</code> includes the loading configuration for the 3D structural data
- and the Molstar plugin. A full description of the structural panel configuration can be found <a href="https://rcsb.github.io/rcsb-saguaro-3d/interfaces/rcsbfvstructureinterface.html">here</a>. </p>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> RcsbFvStructureInterface {
- <span class="hljs-attr">loadConfig</span>: LoadMolstarInterface;
- pluginConfig?: Partial<ViewerProps>;
- }</code></pre>
- <p>The attribute <code>loadConfig: LoadMolstarInterface</code> encodes the configuration for loading the 3D structural data. </p>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> LoadMolstarInterface {
- <span class="hljs-attr">loadMethod</span>: LoadMethod;
- loadParams: LoadParams | <span class="hljs-built_in">Array</span><LoadParams>;
- }</code></pre>
- <ul>
- <li><code>loadMethod: LoadMethod</code> is an enumerated value that indicates the source of the structural models<pre><code class="language-typescript"><span class="hljs-built_in">enum</span> LoadMethod {
- loadPdbId = <span class="hljs-string">"loadPdbId"</span>,
- loadPdbIds = <span class="hljs-string">"loadPdbIds"</span>,
- loadStructureFromUrl = <span class="hljs-string">"loadStructureFromUrl"</span>
- }</code></pre>
- </li>
- <li><code>loadParams: LoadParams | Array<LoadParams></code> encode the parameters needed to collect and load the data. If <code>id</code> is provided, it can be used to identify the 3D models
- in the methods defined by <code>SaguaroPluginPublicInterface</code></li>
- </ul>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> LoadParams {
- id?: <span class="hljs-built_in">string</span>;
- pdbId?: <span class="hljs-built_in">string</span>;
- url?: <span class="hljs-built_in">string</span>,
- isBinary?: <span class="hljs-built_in">boolean</span>
- }</code></pre>
- <a href="#sequence-panel" id="sequence-panel" style="color: inherit; text-decoration: none;">
- <h5>Sequence panel</h5>
- </a>
- <p>The sequence panel organizes information in different blocks where each block encodes the configuration
- (<code>blockConfig</code>) to display one or more feature viewers. Only a single block can be displayed at a time. The optional parameter <code>blockSelectorElement</code> defines a React component
- that renders the html element used to change the displayed block. The class <code>BlockSelectorManager</code> is used to select which block is
- displayed are those that are hidden. For example, <code>blockSelectorManager.setActiveBlock("myBlock")</code> will display the feature viewers defined in the block
- with <code>blockId</code> <code>"myBlock"</code> (see <code>FeatureBlockInterface</code>) and hide the others. Additionally, <code>blockChangeCallback</code> defines a function that will be executed
- when the displayed block changes.</p>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> CustomViewInterface {
- <span class="hljs-attr">blockConfig</span>: FeatureBlockInterface | <span class="hljs-built_in">Array</span><FeatureBlockInterface>;
- blockSelectorElement?: <span class="hljs-function">(<span class="hljs-params">blockSelector: BlockSelectorManager</span>) =></span> JSX.Element;
- blockChangeCallback?: <span class="hljs-function">(<span class="hljs-params">plugin: SaguaroPluginPublicInterface, pfvList: <span class="hljs-built_in">Array</span><RcsbFv>, selection: RcsbFvSelectorManager</span>) =></span> <span class="hljs-built_in">void</span>;
- }</code></pre>
- <p>Source code example can be found in <code>src/examples/multiple-chain/index.ts</code>.</p>
- <p>Each block must contain a unique block identifier (<code>blockId</code>) and the configuration for all the feature viewers that will be rendered
- when the block is activated (<code>featureViewConfig</code>).</p>
- <pre><code class="language-typescript"><span class="hljs-keyword">interface</span> FeatureBlockInterface {
- <span class="hljs-attr">blockId</span>:<span class="hljs-built_in">string</span>;
- featureViewConfig: <span class="hljs-built_in">Array</span><FeatureViewInterface> | FeatureViewInterface;
- }</code></pre>
- <p>The interface for each feature viewer defines its dynamic interaction with the Molstar plugin through different event callbacks functions</p>
- <ul>
- <li><code>sequenceSelectionChangeCallback</code> defines how the Molstar plugin reacts when the feature viewer selection changes</li>
- <li><code>sequenceElementClickCallback</code> defines how the Molstar plugin reacts when a feature viewer element (positional annotation) is clicked</li>
- <li><code>sequenceHoverCallback</code> defines how the Molstar plugin reacts when the mouse hovers the feature viewer or any of its elements</li>
- <li><code>structureSelectionCallback</code> defines how the protein feature viewer reacts when the Molstar plugin selection changes</li>
- <li><code>structureHoverCallback</code> defines how the protein feature viewer reacts when displayed models on the Molstar plugin are hovered</li>
- </ul>
- <pre><code class="language-typescript"><span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> FeatureViewInterface {
- boardId?:<span class="hljs-built_in">string</span>;
- boardConfig: RcsbFvBoardConfigInterface;
- rowConfig: <span class="hljs-built_in">Array</span><RcsbFvRowConfigInterface>;
- sequenceSelectionChangeCallback: <span class="hljs-function">(<span class="hljs-params">plugin: SaguaroPluginPublicInterface, selectorManager: RcsbFvSelectorManager, sequenceRegion: <span class="hljs-built_in">Array</span><RcsbFvTrackDataElementInterface></span>) =></span> <span class="hljs-built_in">void</span>;
- sequenceElementClickCallback: <span class="hljs-function">(<span class="hljs-params">plugin: SaguaroPluginPublicInterface, selectorManager: RcsbFvSelectorManager, d: RcsbFvTrackDataElementInterface</span>) =></span> <span class="hljs-built_in">void</span>;
- sequenceHoverCallback: <span class="hljs-function">(<span class="hljs-params">plugin: SaguaroPluginPublicInterface, selectorManager: RcsbFvSelectorManager, hoverRegion: <span class="hljs-built_in">Array</span><RcsbFvTrackDataElementInterface></span>) =></span> <span class="hljs-built_in">void</span>;
- structureSelectionCallback: <span class="hljs-function">(<span class="hljs-params">plugin: SaguaroPluginPublicInterface, pfv: RcsbFv, selectorManager: RcsbFvSelectorManager</span>) =></span> <span class="hljs-built_in">void</span>;
- structureHoverCallback: <span class="hljs-function">(<span class="hljs-params">plugin: SaguaroPluginPublicInterface, pfv: RcsbFv, selectorManager: RcsbFvSelectorManager</span>) =></span> <span class="hljs-built_in">void</span>;
- }</code></pre>
- <p><code>plugin: SaguaroPluginPublicInterface</code> exposes the interface to interact with the Molstar plugin
- and change model representations (<a href="https://rcsb.github.io/rcsb-saguaro-3d/interfaces/saguaropluginpublicinterface.html">ref</a>).
- It provides multiple methods such as hide, display or select to modify how structural data is displayed. The parameter <code>pfv: RcsbFv</code>
- allows to access the feature viewer API (<a href="https://rcsb.github.io/rcsb-saguaro/classes/rcsbfv.html">ref</a>). It exposes methods to modify
- selections, change board configuration, zoom or adding new tracks.</p>
- <p>Source code example can be found in <code>src/examples/single-chain/index.tsx</code></p>
- <a href="#contributing" id="contributing" style="color: inherit; text-decoration: none;">
- <h2>Contributing</h2>
- </a>
- <p>All contributions are welcome. Please, make a pull request or open an issue.</p>
- <a href="#license" id="license" style="color: inherit; text-decoration: none;">
- <h2>License</h2>
- </a>
- <p>The MIT License</p>
- <pre><code><span class="hljs-attribute">Copyright</span> (c) <span class="hljs-number">2021</span> - now, RCSB PDB and contributors</code></pre><p>Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:</p>
- <p>The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.</p>
- <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.</p>
- </div>
- </div>
- <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
- <nav class="tsd-navigation primary">
- <ul>
- <li class="globals ">
- <a href="globals.html"><em>Globals</em></a>
- </li>
- </ul>
- </nav>
- <nav class="tsd-navigation secondary menu-sticky">
- <ul class="before-current">
- <li class=" tsd-kind-enum">
- <a href="enums/eventtype.html" class="tsd-kind-icon">Event<wbr>Type</a>
- </li>
- <li class=" tsd-kind-enum">
- <a href="enums/loadmethod.html" class="tsd-kind-icon">Load<wbr>Method</a>
- </li>
- <li class=" tsd-kind-enum">
- <a href="enums/rcsbfvdomconstants.html" class="tsd-kind-icon">Rcsb<wbr>FvDOMConstants</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/abstractplugin.html" class="tsd-kind-icon">Abstract<wbr>Plugin</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/abstractview.html" class="tsd-kind-icon">Abstract<wbr>View</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/assemblyview.html" class="tsd-kind-icon">Assembly<wbr>View</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/blockselectormanager.html" class="tsd-kind-icon">Block<wbr>Selector<wbr>Manager</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/chaindisplay.html" class="tsd-kind-icon">Chain<wbr>Display</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/customview.html" class="tsd-kind-icon">Custom<wbr>View</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/molstarplugin.html" class="tsd-kind-icon">Molstar<wbr>Plugin</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/rcsbfv3dabstract.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DAbstract</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/rcsbfv3dassembly.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DAssembly</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/rcsbfv3dcomponent.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DComponent</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/rcsbfv3dcustom.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DCustom</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/rcsbfvcontextmanager.html" class="tsd-kind-icon">Rcsb<wbr>FvContext<wbr>Manager</a>
- </li>
- <li class=" tsd-kind-class">
- <a href="classes/rcsbfvselectormanager.html" class="tsd-kind-icon">Rcsb<wbr>FvSelector<wbr>Manager</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/rcsbfvsequence.html" class="tsd-kind-icon">Rcsb<wbr>FvSequence</a>
- </li>
- <li class=" tsd-kind-class tsd-has-type-parameter">
- <a href="classes/rcsbfvstructure.html" class="tsd-kind-icon">Rcsb<wbr>FvStructure</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/abstractviewinterface.html" class="tsd-kind-icon">Abstract<wbr>View<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/assemblyviewinterface.html" class="tsd-kind-icon">Assembly<wbr>View<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/callbackconfig.html" class="tsd-kind-icon">Callback<wbr>Config</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/chaindisplayinterface.html" class="tsd-kind-icon">Chain<wbr>Display<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/chaindisplaystate.html" class="tsd-kind-icon">Chain<wbr>Display<wbr>State</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/chainselectioninterface.html" class="tsd-kind-icon">Chain<wbr>Selection<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/customviewinterface.html" class="tsd-kind-icon">Custom<wbr>View<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/featureblockinterface.html" class="tsd-kind-icon">Feature<wbr>Block<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/featureviewinterface.html" class="tsd-kind-icon">Feature<wbr>View<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/loadmolstarinterface.html" class="tsd-kind-icon">Load<wbr>Molstar<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface tsd-has-type-parameter">
- <a href="interfaces/loadparams.html" class="tsd-kind-icon">Load<wbr>Params</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfv3dabstractinterface.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DAbstract<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfv3dassemblyinterface.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DAssembly<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfv3dcomponentinterface.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DComponent<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfv3dcomponentstate.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DComponent<wbr>State</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfv3dcssconfig.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DCss<wbr>Config</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfv3dcustominterface.html" class="tsd-kind-icon">Rcsb<wbr>Fv3DCustom<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfvcontextmanagerinterface.html" class="tsd-kind-icon">Rcsb<wbr>FvContext<wbr>Manager<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfvsequenceinterface.html" class="tsd-kind-icon">Rcsb<wbr>FvSequence<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/rcsbfvstructureinterface.html" class="tsd-kind-icon">Rcsb<wbr>FvStructure<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/regionselectioninterface.html" class="tsd-kind-icon">Region<wbr>Selection<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/residueselectioninterface.html" class="tsd-kind-icon">Residue<wbr>Selection<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/saguaroplugininterface.html" class="tsd-kind-icon">Saguaro<wbr>Plugin<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/saguaropluginpublicinterface.html" class="tsd-kind-icon">Saguaro<wbr>Plugin<wbr>Public<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/sequenceviewinterface.html" class="tsd-kind-icon">Sequence<wbr>View<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-interface">
- <a href="interfaces/updateconfiginterface.html" class="tsd-kind-icon">Update<wbr>Config<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-type-alias">
- <a href="globals.html#chaintype" class="tsd-kind-icon">Chain<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias">
- <a href="globals.html#customviewstateinterface" class="tsd-kind-icon">Custom<wbr>View<wbr>State<wbr>Interface</a>
- </li>
- <li class=" tsd-kind-type-alias">
- <a href="globals.html#saguaropluginmodelmaptype" class="tsd-kind-icon">Saguaro<wbr>Plugin<wbr>Model<wbr>Map<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias">
- <a href="globals.html#structureobject" class="tsd-kind-icon">Structure<wbr>Object</a>
- </li>
- <li class=" tsd-kind-variable">
- <a href="globals.html#rcsbrepresentationpreset" class="tsd-kind-icon">Rcsb<wbr>Representation<wbr>Preset</a>
- </li>
- <li class=" tsd-kind-variable">
- <a href="globals.html#rcsbfvwebapppath" class="tsd-kind-icon">rcsb<wbr>FvWeb<wbr>App<wbr>Path</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#buildintervals" class="tsd-kind-icon">build<wbr>Intervals</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#createcomponents" class="tsd-kind-icon">create<wbr>Components</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#getchainvalues" class="tsd-kind-icon">get<wbr>Chain<wbr>Values</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#getmodelentityoptions" class="tsd-kind-icon">get<wbr>Model<wbr>Entity<wbr>Options</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#getstructure" class="tsd-kind-icon">get<wbr>Structure</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#getstructureoptions" class="tsd-kind-icon">get<wbr>Structure<wbr>Options</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#getstructurewithmodelid" class="tsd-kind-icon">get<wbr>Structure<wbr>With<wbr>Model<wbr>Id</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#processgaps" class="tsd-kind-icon">process<wbr>Gaps</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#processmultiplegaps" class="tsd-kind-icon">process<wbr>Multiple<wbr>Gaps</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#selectionfilter" class="tsd-kind-icon">selection<wbr>Filter</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#selectionfromresidueselection" class="tsd-kind-icon">selection<wbr>From<wbr>Residue<wbr>Selection</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="globals.html#splitmodelentityid" class="tsd-kind-icon">split<wbr>Model<wbr>Entity<wbr>Id</a>
- </li>
- </ul>
- </nav>
- </div>
- </div>
- </div>
- <footer class="with-border-bottom">
- <div class="container">
- <h2>Legend</h2>
- <div class="tsd-legend-group">
- <ul class="tsd-legend">
- <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
- <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
- <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
- </ul>
- <ul class="tsd-legend">
- <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
- <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
- </ul>
- <ul class="tsd-legend">
- <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
- <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
- </ul>
- <ul class="tsd-legend">
- <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
- <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
- </ul>
- <ul class="tsd-legend">
- <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
- <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
- </ul>
- </div>
- </div>
- </footer>
- <div class="container tsd-generator">
- <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
- </div>
- <div class="overlay"></div>
- <script src="assets/js/main.js"></script>
- </body>
- </html>
|