BioJS InterMineTable Component : A BioJS component for displaying data from InterMine compatible webservice endpoints [version 1; peer review: 1 approved]

Summary: The InterMineTable component is a reusable JavaScript component as part of the BioJS project. It enables users to embed powerful table-based query facilities in their websites with access to genomic data-warehouses such as http://www.flymine.org, which allow users to perform flexible queries over a wide range of integrated data types.


Introduction
There are currently a number of genomics data-warehouses available which are powered by the InterMine 1 platform.This set includes large curated services dedicated to the primary Model Organism database (MOD) communities as part of the InterMOD project 2 , the collected data sets of research projects such as the modENCODE project 3 , as well as a range of other resources including metabolic-Mine 4 , TargetMine 5 , FlyTFMine 6 , and MitoMiner 7 .In addition to being accessible through web-interfaces these resources also provide web-service access (to be described in a forthcoming paper).
The InterMine system provides users with a number of benefits.A typical InterMine instance, such as FlyMine 8 or YeastMine 9 , contains feature annotations, protein data, publications, biochemical pathways, orthology, Gene Ontology (GO), array expression results, and other kinds of data, all integrated into a single knowledge graph.This means end users are able to ask questions across different data types.InterMine's particular data integration strategy puts minimal limitations on the kinds of queries that can be performed: any arbitrary number of data-sets can be referred to in the same query (provided links exist between them) and a wide variety of logical contraints can be added.The InterMine platform thus provides a basis for very flexible, user-defined queries over linked data sets.
The BioJS 10 project seeks to provide a suite of reusable JavaScript components that members of the bioinformatics community will find useful for producing analysis and visualisation tools.The InterMineTable BioJS component contributes towards this aim by adding a data query and exploration tool to the set of BioJS components which exposes the full flexibility and power of user defined queries over integrated linked data in a clear user interface.

Installation
As a visual BioJS component, the intended audience is web-developers aiming to provide extended functionality to web-based resources for life-scientists.It is expected to be deployed within modern browser environments with access to third-party resources.With this in mind, installation comprises of including the dependencies for the InterMine table component on the page (usually added in the head section of an HTML page), see Supplementary materials A. Once the dependency on the InterMine tables library is loaded, the Inter-MineTable BioJS component may be included (see code listing 1).Once instantiated, the results of the query against the specified integrated data-warehouse are loaded into a component where they can be browsed and manipulated.This means that the two critical concepts for using this component are 1) the location of the data-store, defined as the uniform resource locator (URL) pointing at the root of a set of web-services, and 2) the query to be run on the data in the store, defined in a configuration object.For example, to load a table of data from FlyMine the user would want the URL to point to FlyMine's webservices:

Listing 1. Loading the BioJS InterMine
Listing 2. Specifying the Data-Store var url = " http://www.flymine.org/query" ; The query can be broadly defined as a list of fields, identified by paths from a root, constrained by a (possibly empty) set of filters.
There are some refinements to this (such as sort-order, optional element definition, and constraint composition) for which more detailed documentation 12 exists.The concept of a path is important to the idea of a graph of linked data, as it enables chains of relationships between entities to be followed, with minimal syntactic overhead.For example the chain of relationships the names of the protein domains of the proteins encoded by the genes belonging to a biochemical pathway can be referred to as Pathway.genes.proteins.proteinDomains.name.
A query is defined as a plain JavaScript object which can be simple, such as the following query, which requests the common name, scientific name and taxon ID for all organisms in the data-store: Listing 3. A simple Query, see Figure 1 // Available organisms var query = { name: "An optional name", from: "Organism", select: ["commonName","name","taxonId"], }; or arbitrarily complex, such as the following query which combines information from multiple data sources (OMIM 13 , PANTHER 14 , Treefam 15 , KEGG 16 , Reactome 17 , FlyBase 18 ) and across different organisms to find the Drosophila melanogaster genes in the pathways of genes which are orthologous to human genes implicated in Alzheimer's disease: An element also needs to be present on the page where the table should be loaded.This can be any element (although a DIV element is conventional), and should be uniquely identifiable (through its ID for instance).Once instantiated, a table will be loaded into the page displaying rows of data as specified by the query (see Figure 1, Figure 2).

Interaction
The table, as well as providing a number of common dynamic features such as resorting, pagination and column rearrangement, also

Listing 5. Defining the Target Element var target = "#table-container";
These values are then passed to the component constructor, which builds a new table in the page, and loads the relevant data from the configured service:  undone; the data can be exported in a number of formats or sent to another application, such as a local Galaxy [19][20][21] instance, or to a remote application such as GenomeSpace 22 (Figure 4); the results can be saved as a resusable set (a list) within the originating service; individual items can also be previewed (Figure 5).
permits much deeper interaction than other comparable table libraries.The table allows the underlying query to be changed: the constraints of the underlying query can be edited (Figure 3); columns (including ones referring to data types not in the original query) can be added; existing columns can be removed; changes made can be   One particularly useful feature is the ability to view the contents of a single column, analysing it on aggregate and adding or editing filters.This facility is able to present summary charts for columns based on data type: binned histograms for numerical data (Figure 6), and column charts for categorical data (Figure 7, showing the user adding a filter by selecting items from the column).

Events
The standard mechanism for communication between components in JavaScript is event signalling.As per the BioJS specification, this component supports other objects registering event listeners so they may be notified when events of interest (such as user interactions) occur.
Once loaded, the table may emit a number of different events (as listed in the API documentation 23 ), and may be manipulated by calling methods on the instance, allowing the calling page to respond to user interactions.For example, if a developer wished to receive notifications when the user clicks on any of the cells in the table, they can register to listen for these events: Listing 7. Adding an Event Listener This integration means that the table need not be an isolated part of an application, but can be fully integrated with other components.For example, instead of just notifying the user by using alert, the information about this object could be displayed in another component.If the user clicked on a protein, this could be detected, and other suitable components could be instantiated to display proteinspecific analysis (see code sample 8).    a broad range of data sources meeting the needs of several diverse research communities, we expect that a great deal of duplicated effort can be avoided, saving significant amounts of time and money.
the updated code on GitHub reference to the worm repository).From what I understand from the author's comments is that a separate article should soon be available and will describe the web service implemented by the InterMine repositories and which are used by this BioJS library.It makes it difficult to understand what queries can be done (i.e.what are the tables and fields that can be queried).Nevertheless, this can be inferred by using the example provided (using the manage columns and adding filter buttons on the example page).The authors may want to provide a supplementary table with the address of the web services that can be queried (or a link to another registry if it exists).
In the Supplementary material A section, the last "<script/>" should be </script>.
To summarize, I believe that this library is useful and works well, and that after a few clarifications in the manuscript it will help the user integrate straightforward InterMine tables into their own webpages.
Competing Interests: No competing interests were disclosed.
I confirm that I have read this submission and believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard.

The benefits of publishing with F1000Research:
Your article is published within days, with no editorial bias • You can publish traditional articles, null/negative results, case reports, data notes and more • The peer review process is transparent and collaborative • Your article is indexed in PubMed after passing peer review • Dedicated customer support at every stage • For pre-submission enquiries, contact research@f1000.com

Figure 1 .
Figure 1.A table of data loaded from FlyMine displaying the output of Code Listing 3.

Figure 2 .
Figure 2. A table of data loaded from FlyMine displaying the output of Code Listing 4.

Figure 3 .
Figure 3. Editing the filters on a table.

Figure 4 .
Figure 4. Downloading the results of a query.

Listing 8 .
Integrating with Other Components -Example 1

Figure 6 .
Figure 6.Analysing and filtering a single column of numeric data within a table.

Figure 7 .
Figure 7. Analysing and filtering a single column of categorical data within a table.

if("Protein" === type) { table.service.findById(type, id) .then(loadProteinStructureDisplayer); } function loadProteinStructureDisplayer(protein) { // ... load other BioJS component here. } });
As well as responding to user interaction with the table, the table component exposes an API to change the state of the table by changing the query it represents.This allows communication in the other direction.For example if a linked component, such as a protein structure displayer, emits an event indicating the user has selected a given set of protein domains, the table could be modified by adding a filter for these domains to the current query (see code sample 9): table.addListener("imo:click", function (type, id) {