How lkaihua/bipeline works
Project Type and Purpose
• This is a full‐stack R/Shiny web application (“Bipeline”) for visually exploring biclusters in multivariate time series.
• Its pipeline has three main stages: pre‐processing, segmentation, and biclustering, all orchestrated through a Shiny UI.
File Structure
Top‐Level Files and Directories:
• server.R & ui.R – Shiny’s server and UI entry points (controller & view).
• Multiple R scripts in root (model components):
– normalize.R, segMerge.R, baselineBiclustering.R, LSDD.R, LSDDbiclustering.R, LSDDsegmentation.R, PDFbiclustering.R, tryLSDDBicluster.R, etc.
• data/ – sample CSVs for input.
• JavaScript assets: download.js, html2canvas.js, shinyjsBi.js, shinyjsSeg.js (enhance UI interactions, screenshot).
• ShinyDashboard.Rproj – project file.
README for Additional Insights
• Describes three major UI panels (Importing, Plotting, Pre‐processing, Segmentation, Biclustering).
• Highlights use of R packages (dygraphs, biclust) and custom algorithms (BiclusTS via LSDD).
• Mentions state/history management, dynamic UI (per‐variable segmentation tabs), screenshot functionality.
Main Components
a. Client Browser (UI Layer)
– Shiny UI (ui.R): HTML widgets, dygraphs plots, control panels.
– JavaScript helpers: html2canvas.js (screenshots), download.js, shinyjsBi.js, shinyjsSeg.js.
b. Shiny Server (Controller)
– server.R orchestrates inputs from UI, invokes R modules, and returns results.
– State/history manager (progress bar, navigation).
c. R Processing Modules (Model)
– Pre‐processing scripts (normalize.R, baselineBiclustering.R, etc.)
– Segmentation scripts (LSDDsegmentation.R, segMerge.R)
– Biclustering scripts (LSDDbiclustering.R, PDFbiclustering.R, tryLSDDBicluster.R)
– Interaction with biclust R package for baseline methods.
d. Data Storage
– Local CSV files (data/).
– Saved segmentation & biclustering results (RDS or CSV on disk).
e. External Libraries & Services
– R packages: dygraphs, biclust, shiny, shinyjs, etc.
– No external web services; all computation is server‐side in R.
Relationships & Data Flows
• User actions in Browser → UI (R + JS) → Shiny Server
• Shiny Server → calls R Processing Modules → reads/writes data (data/) → returns results
• Screenshot flow: UI → html2canvas → file download
Architectural Patterns & Principles
• MVC‐like separation: ui.R = view, server.R = controller, R scripts = model
• Pipeline stages represented as a linear or modular pipeline (pre‐processing → segmentation → biclustering)
• Dynamic UI generation for per‐variable segmentation parameters
• History/state pattern for undo/redo
– Cluster of R Modules subdivided into Pre‐processing, Segmentation, Biclustering (scripts named)