Introduction#

bfabric_web_apps is a Python library designed for developing and integrating satellite applications with the B-Fabric Laboratory Information Management System (LIMS).


Overview#

This library is written using Python Dash as a front-end interface for building WebApps. bfabric_web_apps simplifies the development of web applications that interact with B-Fabric. Using a template-based approach, it standardizes common patterns, streamlines development, and provides a modular foundation for extending B-Fabric with satellite applications.


Key Features#

Seamless B-Fabric Integration#

  • Token Management Securely handle authentication tokens to enable user sessions and API access.

  • Entity Data Management Dynamically retrieve, update, and manage B-Fabric entities in your application.

  • Application Management Register and manage applications in B-Fabric.

  • Integrated Job Logging Capture job activity, command execution, and application-specific events out of the box.

  • Automatic Charging Bill resource usage to the appropriate project containers through an integrated charge switch.


Generalized Workflow Support#

  • Resource Creation Automatically generate and register B-Fabric resources (e.g., text files, reports, output folders).

  • Workunit Creation Easily define and create workunits programmatically during job submission.

  • Report and Link Creation Attach HTML reports or downloadable files directly to B-Fabric entities.


Pipeline Execution Wrapper#

  • run_main_job() Function Generic wrapper for executing Bash-based workflows, saving files, creating resources, and logging execution steps. Includes support for Redis queue submission and remote processing.


UI Framework & Developer Utilities#

  • Prebuilt Dash Components and Layouts Leverage boilerplate UIs, layout helpers, and responsive components to accelerate app development and ensure consistency across apps.

  • Callback Templates Ready-to-use callbacks for modals, alerts, authentication logic, and submission actions.

  • Bug Reporting Integration Automatically send bug reports to a specified email address when a submission fails or throws an exception.


What Is This Library?#

bfabric_web_apps is your foundation for building web applications that interface directly with B-Fabric. Its core objectives include:

  • Automating repetitive tasks like token handling and entity lookups.

  • Simplifying the creation of dashboards with Dash and Plotly for data visualization.

To see the full source code or to contribute, visit the main GitHub repository:
bfabric_web_apps


Quickstart#

Developers can hit the ground running with the bfabric_web_app_template, a ready-made project that demonstrates how to configure and deploy a bfabric_web_apps application end-to-end. It includes:

  • Preconfigured layout using Dash and Bootstrap

  • Authentication flow for B-Fabric

  • Examples of logging, API interaction, and entity handling

Alternatively, if you want to get started quickly, you can find a simple template example here:
Basic Usage Example


Learn by Watching#

If you prefer learning by video, check out our dedicated Video Tutorials section. It includes step-by-step deployment guides, use case walkthroughs, and insights into best practices using bfabric_web_apps.


Templates#

The bfabric-web-app-template repository provides a flexible foundation for building Dash applications that integrate with B-Fabric using the bfabric_web_apps library. It includes three preconfigured templates suited for different levels of complexity:

All templates follow a shared structure built around three core components: collecting user input, retrieving metadata from B-Fabric, and triggering workflow execution. This modular design promotes consistency and reusability across applications.

To get started with the templates, please refer to the Template Usage section.


Use Cases#

The bfabric_web_apps library has been successfully used to build multiple proof-of-concept applications. The following chapters provide detailed examples of how bfabric_web_apps can be used in practice:

Note

Work in Progress
The following use case chapters are currently under construction and not yet complete. Content will be added and refined continuously to better showcase applications built with the bfabric_web_apps library.

  • Nextflow – Demonstrates how to run a large-scale Nextflow pipeline like RNA-seq via a fully integrated Dash interface using bfabric_web_apps.

  • SUSHI Apps – Showcases an application wrapper for Sushi applications via B-Fabric that enables flexible job configuration and execution through the Sushi backend.


What Is B-Fabric?#

B-Fabric is a Laboratory Information Management System (LIMS) developed for managing scientific experiments and their associated data. It offers a robust platform to track samples, analyze results, and organize workflows efficiently for researchers, laboratories, and core facilities.

For more information, visit the B-Fabric official website.


What Is BfabricPy?#

BfabricPy is a Python library that serves as a programmatic interface to interact with the B-Fabric API. It enables developers to perform operations such as querying data, uploading results, and managing B-Fabric entities seamlessly from Python-based applications.

BfabricPy is a core dependency of bfabric_web_apps and powers API connections for building custom applications.

For more information, visit the BfabricPy GitHub repository.


What Is Dash?#

Dash is a Python framework for building interactive web applications with a focus on data visualization and analytics. It combines the power of Plotly for frontend visualizations and Flask for backend support, making it ideal for creating scientific and analytical dashboards.

For more details, refer to the Dash official documentation.