Skip to content

Feature implementation

almgong edited this page Oct 6, 2016 · 18 revisions

Implementation deatils

##Metabolite Analysis (MA)

###Overview: MA uses both REST and web controllers. REST controllers exist to begin analysis, whereas the web controllers exist to display HTML results of the analysis.

Here is a breakdown of the expected interaction with the MA feature, as well as high level details of the business logic:

  • On the front end, a user will fill out the form that contains important threshold values, among others.
  • On form submit, the input file will be uploaded to S3, client-side, via the AWS JavaScript SDK.
  • Once the input file is uploaded, a REST call is made to HTTP POST /analyze/metabolites/<token>, where <token> is a UUID retrieved from HTTP GET /analyze/token. This starts analysis.
  • The server will run the appropriate R commands via Rserve, which leads to a certain number of files being generated to a predefined directory.
  • The server will read in these files and store the results into the database.
  • The REST call above returns some HTML to display to the user, either an error or success message with a link to the results page.
  • The user navigates to the result page, and the web controller contacts the database for the computed results.
  • The results are passed back to the front end, using Thymeleaf as the template engine.
  • The JavaScript modules and libraries (D3.js) now do their work to initialize and bind the necessary events. ** Notable JS classes: DataSegregator.js for segregating the output from the server into significance groups, SVGPlot.js, handles all plotting and interactive events for the plot(s).

##Temporal Pattern Recognition Analysis

###Overview

Clone this wiki locally