24
Development of Spotfire Tools at Tibotec

Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Embed Size (px)

Citation preview

Page 1: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Development of Spotfire Tools at Tibotec

Page 2: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Overview

Looking at data from different anglesSaveable toolsQuery device visualizationProtein visualizationSAS integration

Page 3: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Overview

Looking at data from different anglesDepivotSummarize/Unique

Saveable toolsQuery device visualizationProtein visualizationSAS integration

Page 4: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Depivot tool

Example: distances between major European cities

Page 5: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Depivot tool

Depivot to records containing single distance:

Scatter Plot

ViennaStockholm

RomeParis

MunichMilan

MarseillesMadridLyonsLisbon

Hook of HollandHamburg

GibraltaGeneva

CopenhagenCologne

CherbourgCalais

BrusselsBarcelona

Athens

Page 6: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Depivot Tool

Implementation:ADO

recordsetEnlarge the

code sample if possible

<script language="JavaScript" src="spotfire://Spotfire.Package.Definitions/ado.js"></script>

var sRS= recs.GetRecordSet();

var fRS= new ActiveXObject("ADODB.Recordset");

fRS.Fields.Append(colValName,sRS.Fields(sCols[0]).Type,

sRS.Fields(sCols[0]).DefinedSize,adFldIsNullable);

fRS.Open();

fRS.AddNew();

fRS.Fields(2).Value=rec.Field(col);

Page 7: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Summarize

Summary viewer calculations in tableExample: baseball data set

Page 8: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Unique Records Tool

Creates column to be used in query for showing part of the dataset.Example: summarized data in baseball data set.

Page 9: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Overview

Looking at data from different angles Saveable tools

Why?Demo of Global AnnotationImplementationTechnical hurdles

AfterSave event

Query device visualizationProtein visualizationSAS integration

Page 10: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Saveable tools

Some tools with control windows, are actually new visualizations.Example: summary table from DecisionSite StatisticsConfiguration data of the tool is often data dependant

Problem: not saveable

Page 11: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Saveable tools

Example: Global Annotation ToolProvides annotation on the file level.Updated by tools that generate data in a new spotfire

(Do you mean DecisionSite?).

Page 12: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Saveable tools

Implementation: In the saveable tool

Capture beforeSave event Wrap configuration data in xml and append to HTML-details-on-

demand Remove data after saving is done Extra checkbox to force saving for exports When launched check for wrapped configuration data in HTML-

details-on-demand In plugin

Capture VisualizationOpen event Look for wrapped configuration data in HTML-details-on-demand Launch tools

Page 13: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Saveable tools

Example of wrapped xml: (enlarge code text)

<xml>

<global-annotation>

<tool-name>Tibotec.Tools.GlobAnnot</tool-name>

<annotation>Created by Depivot Tool</annotation>

</global-annotation>

</xml>

Page 14: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Saveable tools

Technical hurdles:No afterSave event availableSolution:

Set Modified flag for visualization Use polling to wait for Modified flag to be reset by save

operation

The beforeSave event is not triggered by exportsSolution:

Extra checkbox in user interface to force wrapping configuration data and appending to HTML-details on demand.

Page 15: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Overview

Looking at data from different angles Saveable toolsQuery device visualization

Why?Demo of functionalityTechnical hurdles

Getting the active Query Device Getting the active Visualization

Protein visualizationSAS integration

Page 16: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Query Device Visualization

When dealing with complex datasets, query device settings are hard to track

Considering a set of query devices as a linear chain of filtersHow is the data filtered? (e.g. how many records are

deselected by a particular query device?)Switching between query device settingsSaving multiple query device settings

Page 17: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Query Device Visualization

Tibotec Query Device Visualization Tool

Page 18: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Query Device Visualization

Technical hurdles:Getting the active Query Device

When editing search field ‘Full Text Search’ query device, the active query device is not changed.

Solution: refresh button in user interface

Getting the active Visualisation When the ‘Query Devices’ window is active it is not possible

to get the active Visualization

Undocumented OnReset event

Page 19: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Overview

Looking at data from different angles Saveable toolsQuery device visualizationProtein visualization

Embedding other ActiveX componentsSAS integration

Page 20: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Protein visualization

Embedded ActiveX object

Page 21: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Protein Visualization

Technical Hurdles:Local path to files in packageSolution: use PackageManagerEnlarge code textvar pkgMgr = new ActiveXObject("Spotfire.PackageManager");

var pkg = pkgMgr.LookupInstalled("Tibotec.Package.ProtMapTool");

var pkgRes = pkg.MapUrl(getTheResourceObject().BuildPath(prot));

tmpPath=pkgRes.LocalPath;

Page 22: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

Overview

Looking at data from different angles Saveable toolsQuery device visualizationProtein visualizationSAS integration

Technical Hurdles Transferring data

Page 23: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

SAS integration

Use SAS to calculate new columnsExample: Random Number Generator

Use SAS to generate new datasetExample: Correlation Analysis

Page 24: Development of Spotfire Tools at Tibotec. Overview Looking at data from different angles Saveable tools Query device visualization Protein visualization

SAS integration

Technical hurdles:Contacting SAS server

Use SASWorkspaceManager.ServerDef

SAS-incompatible column names Transferring data to SAS

– Create empty dataset in SAS and use ADODB to fill with data.

obServerDef.Port = 6960 ' ObjectServerPort

obServerDef.Protocol = 2 ' (ProtocolBridge)

obServerDef.MachineDNSName = "tc479"