Skip to content

Bacnet Architecture

drbecavin edited this page Dec 20, 2021 · 2 revisions

BACNET V2 - Update December 2021

Setting up Bacnet API

Bacnet was originally developed using Eclipse RCP API. This API has been created for the Eclipse IDE. It helps for the implementation of rich client software. An Ajax version was latter developed named Eclipse RAP for rich internet websites. They have been implemented with similar API allowing for single-source implementation. Bacnet is organized in 4 plug-ins and 2 features:

  • bacnet.core package for all the necessary tools of the platform
  • bacnet.scripts for all methods allowing creation of the database
  • bacnet.e4.rap.setup a web interface for multi-omics database creation
  • bacnet.e4.rap for creating the mult-iomics website It includes also 2 features for the deployement of bacnet websites on Apache Tomcat server:
  • bacnet.setup.feature a web interface for multi-omics database creation
  • bacnet.webapp.feature for creating the mult-iomics website

Most of the API is placed in bacnet.core package. It includes all core classes for data and sequence manipulation, all visualization tools, all script for data processing. The second package bacnet.scripts is used mostly for database creation, and for running specific scripts. Then comes the three packages for the clients. We have built a web interface for the database creation of your multi-omics website: bacnet.e4.rap.setup. The final end product will be bacnet.e4.rap (website). The choice of Eclipse RAP architecture was made because of its easy to use interface named WindowBuilder. It allows the user to quickly design its own view by adding panels, buttons, canvas in a “one click” fashion. One can also add existing graphical API based on Javascript. Bacnet is capable of dealing with omics data (genomics, transcriptomics and proteomics) and sequence data. For omics datasets we have developed our own Java classes. They all inherited from bacnet.datamodel.dataset.OmicsData. The majority of data are matrices of expression and for that we have created a structure close to what is known as DataFrame in R and Python. In Bacnet, it is called ExpressionMatrix. For coverage data we created a structure for streaming the file. By saving properly the file and accessing at the right byte we achieved a fast loading of every sequencing data provided in Wig format. We used java.io.BufferedInputStream library for that. All other omics data is serialized using common java.io.ObjectOutputStream library. For the sequence data (genome and genes) we inherited our Bacnet classes from BioJava API. We modified some of them to increase loadings and correct some errors in genome annotation parsing. All classes for genome and genome elements can be found in bacnet.datamodel.sequence.

Building Omics tools

We have developed different viewer for genome related information. All can be found in bacnet.sequenceTools folder. For going through omics data we have created viewer found in bacnet.expressionAtlas folder. They allow to display list of omics data available but also browse through them with expression and protein atlas tools. Atlases do not rely on query-based tools with SQL like databases. Instead we choose a more flexible flat table representation. Bacnet architecture loads gene X transcriptomics or gene X proteomics table once and answer the query by looking at the right row and column of the table. As these matrices are serialized and have an ExpressionMatrix structure, load and query are very fast. In addition, atlas tables can be saved in text file and controlled by the user building its own multiomics database.

Building Genome Viewer

The main tool of Bacnet platform is its multi-omics genome viewer. One can display a wide variety of heterogeneous datasets. We have developed our own custom viewer. It relies on Canvas drawing of the graphical SWT API. We have designed a multi-zoom genome viewer. At each scale of the display, from genome-wide to few base pair, we display coverage or genome elements with appropriate details. For example, sequencing coverage will not be displayed entirely when the scale is around the genome. Many specific genomic elements can be drawn: Genes, non-coding RNAs, smallRNAs, antisense RNAs, riboswitches. The variety of omics dataset drawn is also vast: RNA-Seq, DNA-Seq, microarray, tiling array, Transcription start sites sequencing (TSS), transcription termination sites sequencing (TIS), proteomic arrays, mass spectrometry. Each element of the genome viewer has a custom multi-zoom schematic representation. Thanks to the datamodel of OmicsData, only the region of display is loaded. It provides unnecessary memory charge. All necessary classes for genome viewer can be found in bacnet.genomeBrowser package.

Setting the co-expression network interface

The co-expression network tool is the only component relying on javascript libraries. First, a co-expression matrix is calculated with available datasets. Briefly, Bacnet creates a list of omics data for which the absolute expression value is available. For each pair of genomes elements Bacnet calculates their pearson correlation. It is then saved and compressed using common serialization functions of Java. For the visualization of the network we developed a custom d3.js network panel. The co-expression table is sent to the d3.js view thanks to the available interface between Eclipse RAP and Javascript.