From 3e30537f0eded8cd31d913374370ae85e6e0f709 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Thu, 11 Jan 2024 08:57:43 +0100 Subject: [PATCH] Renamed output files --- .gitignore | 3 ++- docs/usage/parameters.md | 8 ++++---- .../main/nextflow/co2footprint/CO2FootprintConfig.groovy | 4 ++-- .../main/nextflow/co2footprint/CO2FootprintFactory.groovy | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 929484e..39639eb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,6 @@ build work out -co2footprint-*.txt +co2footprint_*.txt +co2footprint_*.html site \ No newline at end of file diff --git a/docs/usage/parameters.md b/docs/usage/parameters.md index 64b9558..980a85f 100644 --- a/docs/usage/parameters.md +++ b/docs/usage/parameters.md @@ -9,7 +9,7 @@ You can adjust the nf-co2footprint plugin parameters in your config file as foll ```groovy title="nextflow.config" co2footprint { - file = "${params.outdir}/co2footprint.txt" + file = "${params.outdir}/co2footprint_trace.txt" reportFile = "${params.outdir}/co2footprint_report.html" ci = 300 pue = 1.4 @@ -25,11 +25,11 @@ nextflow run nextflow-io/hello -c nextflow.config The following parameters are currently available: - `file`: Name of the TXT carbon footprint report containing the energy consumption, the estimated CO2 emission and other relevant metrics for each task. -Default: `co2footprint-.txt`. +Default: `co2footprint_trace_.txt`. - `summaryFile`: Name of the TXT carbon footprint summary file containing the total energy consumption and the total estimated CO2 emission of the pipeline run. -Default: `co2footprint-.summary.txt`. +Default: `co2footprint_summary_.txt`. - `reportFile`: Name of the HTML report containing information about the entire carbon footprint, overview plots and more detailed task-specific metrics. -Default: `co2footprint-report-.html`. +Default: `co2footprint_report_.html`. - `ci`: carbon intensity of the respective energy production. Mutually exclusive with the `location` parameter. Default: 475. - `location`: location code to automatically retrieve a location-specific CI value. diff --git a/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintConfig.groovy b/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintConfig.groovy index dbee1ba..7d1387a 100644 --- a/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintConfig.groovy +++ b/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintConfig.groovy @@ -9,8 +9,8 @@ import groovy.util.logging.Slf4j * In this plugin, the user can configure the output file names of the CO2 footprint calculations * * co2footprint { - * file = "co2footprint.txt" - * summaryFile = "co2footprint.summary.txt" + * file = "co2footprint_trace.txt" + * summaryFile = "co2footprint_summary.txt" * ci = 300 * pue = 1.4 * powerdrawMem = 0.67 diff --git a/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintFactory.groovy b/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintFactory.groovy index 3a62932..a9b2a1e 100644 --- a/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintFactory.groovy +++ b/plugins/nf-co2footprint/src/main/nextflow/co2footprint/CO2FootprintFactory.groovy @@ -243,8 +243,8 @@ class CO2FootprintFactory implements TraceObserverFactory { class CO2FootprintTextFileObserver implements TraceObserver { // TODO which files should we generate here? - public static final String DEF_FILE_NAME = "co2footprint-${TraceHelper.launchTimestampFmt()}.txt" - public static final String DEF_SUMMARY_FILE_NAME = "co2footprint-${TraceHelper.launchTimestampFmt()}.summary.txt" + public static final String DEF_FILE_NAME = "co2footprint_trace_${TraceHelper.launchTimestampFmt()}.txt" + public static final String DEF_SUMMARY_FILE_NAME = "co2footprint_summary_${TraceHelper.launchTimestampFmt()}.txt" /** * Overwrite existing trace file (required in some cases, as rolling filename has been deprecated) @@ -505,7 +505,7 @@ class CO2FootprintFactory implements TraceObserverFactory { */ class CO2FootprintReportObserver implements TraceObserver { - static final public String DEF_REPORT_FILE_NAME = "co2footprint-report-${TraceHelper.launchTimestampFmt()}.html" + static final public String DEF_REPORT_FILE_NAME = "co2footprint_report_${TraceHelper.launchTimestampFmt()}.html" static final public int DEF_MAX_TASKS = 10_000