Skip to content

nf-co2footprint

A Nextflow plugin to estimate the CO₂ footprint of pipeline runs.

Introduction

The nf-co2footprint plugin estimates the energy consumption for each pipeline task based on the Nextflow resource usage metrics and information about the power consumption of the underlying compute system. The carbon intensity of the energy production is then used to estimate the respective CO₂ emission.

The calculation is based on the carbon footprint computation method developed in the Green Algorithms Project.

Green Algorithms: Quantifying the Carbon Footprint of Computation
Lannelongue, L., Grealey, J., Inouye, M.,
Adv. Sci. 2021, 2100707. https://doi.org/10.1002/advs.202100707

The nf-co2footprint plugin generates a detailed TXT carbon footprint report containing the energy consumption, the estimated CO₂ emission and other relevant metrics for each task. Additionally, an HTML report is generated with information about the carbon footprint of the whole pipeline run and containing plots showing, for instance, an overview of the CO₂ emissions for the different processes.

Quick Start

Declare the plugin in your Nextflow pipeline configuration file:

nextflow.config
plugins {
  id 'nf-co2footprint@1.0.0-beta'
}

This is all that is needed. Run your pipeline with the usual command:

nextflow run <pipeline_name>.nf 

More details are available in the Nextflow plugin documentation and the configuration guide.

Contributing

Before contributing, please read the contribution guidelines carefully. You may also find the recommended testing setup helpful.

After your changes are accepted. maintainers may then publish a new version along with your contribution.

Credits

The nf-co2footprint plugin is mainly developed and maintained by Sabrina Krakau, Júlia Mir-Pedrol, Josua Carl, and Nadja Volkmann at QBiC.

We thank the following people for their extensive assistance in the development of this plugin:


Data Attribution

This project uses carbon intensity (CI) data from Electricity Maps under the Open Database License (ODbL).
Depending on the configuration, either historical yearly data from 2024 is used or real-time CI values are accessed via the Electricity Maps API.

Electricity Maps: Carbon Intensity Data
Electricity Maps (2025). 2024 Yearly Carbon Intensity Data (Version January 27, 2025).
Electricity Maps. https://www.electricitymaps.com

You are free to use, share, and adapt the data under the terms of the ODbL. For more details and attribution requirements, see the NOTICE file.