BioFlow-Insight
Description
BioFlow-Insight is a Python-based open-source command-line tool designed to automatically analyse Nextflow workflow code, gathering useful information, particularly in the form of visual graphs that illustrate the workflow's structure and its various steps. Additionally, it is capable of detecting certain programming errors and generates a RO-Crate JSON-LD file that describes the workflow. It also generates a json describing the workflow's srtucture in a simplified metro-map form which can be visualised with MetroFlow.
BioFlow-Insight is easily installable as a CLI (see here). It is also freely accessible as a free web service. For more information and to start using BioFlow-Insight, visit here (https://bioflow-insight.pasteur.cloud/).
Table of Contents
Installation
Installing via pip
BioFlow-Insight is easily installable as a CLI.
To install it using pip, use the following command :
pip install bioflow-insight
Using from source
To access its source code, simply clone its GitLab repository. BioFlow-Insight is developed using Python 3
BioFlow-Insight's dependencies are given in the requirements.txt file.
Note : To install graphviz, in linux you might need to execute this command
sudo apt install graphviz
Usage
BioFlow-Insight is a Python-based open-source command-line tool designed to automatically analyse Nextflow workflow code, gathering useful information, particularly in the form of visual graphs that illustrate the workflow's structure and its various steps. Additionally, it is capable of detecting certain programming errors and generates a RO-Crate JSON-LD file that describes the workflow. It also generates a json describing the workflow's srtucture in a simplified metro-map form which can be visualised with MetroFlow.
For an explanation of the different elements composing a Nextflow workflow, see its documentation.
The graphs generated by BioFlow-Insight are :
-
Specification graph: BioFlow-Insight reconstructs the workflow’s specification graph from its source code without having to execute it. The specification graph is defined as a directed graph where nodes are processes and operations, and edges are channels that are directed from one vertex to another (steps of the workflow are ordered). This graph represents all the possible interactions between processes and operations through channels that are defined in the workflow code. Within the specification graph, we define two types of operations: operations are categorised in two groups: the following operations defined as operations that have at least one input, and the starting operations defined as operations without any inputs.
-
Process dependency graph: BioFlow-Insight generates the process dependency graph which represents only processes (nodes) and their dependencies (edges). Similar to the dependency graph, this graph is constructed by removing all operations, leaving only processes, and linking them based on their dependencies in the original specification graph. Again in this representation, the edges no longer represent interaction between its elements, but their dependencies.
-
Metro-Map Json file: BioFlow-Insight also generates the metro-map json file, which describes the workflow in metro-map form (with process code, conditions represented by colour, etc..). This needs to be updated
To run BioFlow-Insight to obtain all the outputs, run this command:
bioflow-insight --analysis bioflow my_workflow/main.nf
If you want to simply obtain the json file which describes the Metro-Map, run this command:
bioflow-insight --analysis metroflow my_workflow/main.nf
For a more in-depth explanation of BioFlow-Insight functionnalities, visit its webpage here (https://bioflow-insight.pasteur.cloud/specification/).
Using BioFlow-Insight directly through the source
You can also use BioFlow-Insight directly through the source code without having to install the command line but using a python environment. Here is an example to so (after cloning the repo):
#Importing the Workflow class
import os
current_path= os.getcwd()
os.chdir("bioflow-insight/")
from src.workflow import Workflow
os.chdir(current_path)
#Initialising the workflow
w = Workflow("../MyWorkflow/")
w.initialise_with_bioflow()
w.generate_specification_graph(render_graphs=False)
w.generate_process_dependency_graph(render_graphs=True, with_conditions = True)
#Get the processes called
processes_called = w.get_processes_called()
#Generate RO-Crate and Prov-Crate
w.get_rocrate()
w.get_prov_rocrate()
w.get_history()
Citing BioFlow-Insight
Please cite BioFlow-Insight in any research that uses or extends BioFlow-Insight.
To cite BioFlow-Insight, please use the following publication:
George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen-Boulakia, BioFlow-Insight: facilitating reuse of Nextflow workflows with structure reconstruction and visualization, NAR Genomics and Bioinformatics, Volume 6, Issue 3, September 2024, lqae092, https://doi.org/10.1093/nargab/lqae092
License
This project is licensed under the MIT License.
Funding
This work received support from the National Research Agency under the France 2030 program, with reference to ANR-22-PESN-0007.
Metadata
Release files for bioflow-insight 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bioflow_insight-2.1.0.tar.gz | 13.8 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bioflow_insight-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 MB
Release files / bioflow_insight-2.1.0.tar.gz
| Download URL | bioflow_insight-2.1.0.tar.gz |
|---|---|
| Size | 13.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46298a9b7dbe32381a51799be8fa99202f276dcf00cd6ddd658983ada416c3f9
|
|
BLAKE2b-256 checksum How to use checksums |
585149b7fa3a8f66c1d319929d63b59ee3016fc5919990f12e68b5b25a1ef9c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / bioflow_insight-2.1.0-py3-none-any.whl
| Download URL | bioflow_insight-2.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ee0c4361d28d2168b523518b88c83244f9bac529ae9dd50185c51fdf4c157cb
|
|
BLAKE2b-256 checksum How to use checksums |
666a317b6d57b0c31c04840bb8cafe9667831818d4f5aa2c65ca04bf5729d3e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for bioflow-insight 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.