Whirl: BCO R package converter
Whirl, developed by Novo Nordisk, is an open-source R package designed to streamline the creation of BioCompute Objects (BCOs) from ready or near-ready YAML files that define computational pipeline structures. By automating the generation of BCOs compliant with the BioCompute standard, Whirl reduces the manual effort required to document complex bioinformatics workflows.
This package is especially useful for researchers, bioinformaticians, and regulatory scientists who need to create reproducible, transparent, and standardized records of their data analysis pipelines. Whirl extracts relevant metadata, execution details, and file information from the YAML configuration and pipeline runs, packaging them into a structured JSON BCO suitable for FDA submissions or collaborative sharing.
Follow the steps below to try out the tool:
- Install the whirl package:
> install.packages("devtools")> devtools::install_github("NovoNordisk-OpenSource/whirl") - Load the package:
> library(whirl) - Prepare your YAML configuration (either already have a YAML or needs to define the pipeline manually):
#example of a basic pipeline that meets the BCO requirements> whirl_config <- list(+ steps = list(+ export_mtcars = list(+ run = "step1.R"+ )+ ),+ biocompute = list(+ object_id = "bco-mtcars-001",+ spec_version = "1.3.0",+ etag = "etag-mtcars-001",+ usability = list("Example use case: exporting mtcars dataset"),+ extension = list(+ whirl_test_extension = list(+ info = "Exporting mtcars dataset as test run"+ )+ )+ )+ ) - Write to _whirl.yml:
> writeLines(as.yaml(whirl_config), "_whirl.yml") - Run YAML config:
> queue <- run("_whirl.yml") - Write into a BCO:
> write_biocompute(queue, file = "bco.json")