Downloads

nf-fgbio

CI Nextflow Java Versions

Use various fgbio functions and classes in your Nextflow scope.

Fulcrum Genomics

Visit us at Fulcrum Genomics to learn more about how we can power your Bioinformatics with nf-fgbio and beyond.

Quickstart

Add the plugin to your Nextflow config:

plugins { id 'nf-fgbio' }

readStructure

A Read Structure refers to a String that describes how the bases in a sequencing run should be allocated into logical reads. The readStructure function converts a string into an fgbio ReadStructure object. This function can be used to validate a read structure, as well as query and manipulate the read structure and its read segments.

For example:

include { readStructure } from 'plugin/nf-fgbio'

channel.of("12M138T", "4M3S12B100T")
  .map { it -> readStructure(it) }
  .map { it -> it.segments() }
  .view()

The above example creates a channel with two read structures (each as strings), converts them into a fgbio ReadStructure object, and returns a vector of read segments for each read structure.

Vector(12M, 138T)
Vector(4M, 3S, 12B, 100T)

fromSampleSheet

The fromSampleSheet factory method parses a sample sheet from a file and returns a list of fgbio Sample data objects. This allows downstream processes to operate per-sample, with sample metadata stored in the Sample object. For example:

include { fromSampleSheet } from 'plugin/nf-fgbio'

channel.fromSampleSheet("./plugins/nf-fgbio/build/resources/main/samplesheet.csv")
  .map { it -> it.sampleName }
  .view()

yields a channel of sample names:

Sample_Name_1
Sample_Name_2
Sample_Name_3
Sample_Name_4
Sample_Name_5
Sample_Name_6
Sample_Name_7
Sample_Name_8
Sample_Name_9
Sample_Name_10
Sample_Name_11
Sample_Name_12

The lane option can be specified to restrict to samples from a specific lane.

channel.fromSampleSheet("/path/to/samplesheet.csv", lane: 1)

Testing the Plugin Locally

Execute the following to compile and run unit tests for the plugin:

make compile
make test

To install the plugin for use in local workflows (e.g. not internet connected), execute the following:

make install-local

Developing the Plugin Locally

Execute the following to build the plugin along with Nextflow source files:

make compile-with-nextflow

Test your changes to the plugin on a Nextflow script like:

NXF_PLUGINS_DEV="${PWD}/plugins" nextflow/launch.sh run <script.nf> -plugins nf-fgbio

Publishing to GitHub

After bumping the version of the plugin in the file MANIFEST.MF, execute the following:

GITHUB_TOKEN=... GITHUB_USERNAME=... GITHUB_COMMIT_EMAIL=... make publish-to-github

Releases

Release Date Downloads Author
1.0.0 2025-05-17 170 nh13