From 4d2c9e8f8237fc2227b8e29ea16889c532b40479 Mon Sep 17 00:00:00 2001 From: lyh970817 Date: Sun, 15 Mar 2026 16:51:13 +0800 Subject: [PATCH 1/2] Add HDL h2 and rg modules --- modules/nf-core/hdl/h2/environment.yml | 10 +++ modules/nf-core/hdl/h2/main.nf | 35 +++++++++ modules/nf-core/hdl/h2/meta.yml | 62 ++++++++++++++++ modules/nf-core/hdl/h2/templates/hdl_h2.R | 41 +++++++++++ modules/nf-core/hdl/h2/tests/main.nf.test | 64 +++++++++++++++++ modules/nf-core/hdl/h2/tests/nextflow.config | 3 + modules/nf-core/hdl/rg/environment.yml | 10 +++ modules/nf-core/hdl/rg/main.nf | 36 ++++++++++ modules/nf-core/hdl/rg/meta.yml | 74 ++++++++++++++++++++ modules/nf-core/hdl/rg/templates/hdl_rg.R | 63 +++++++++++++++++ modules/nf-core/hdl/rg/tests/main.nf.test | 72 +++++++++++++++++++ modules/nf-core/hdl/rg/tests/nextflow.config | 9 +++ 12 files changed, 479 insertions(+) create mode 100644 modules/nf-core/hdl/h2/environment.yml create mode 100644 modules/nf-core/hdl/h2/main.nf create mode 100644 modules/nf-core/hdl/h2/meta.yml create mode 100644 modules/nf-core/hdl/h2/templates/hdl_h2.R create mode 100644 modules/nf-core/hdl/h2/tests/main.nf.test create mode 100644 modules/nf-core/hdl/h2/tests/nextflow.config create mode 100644 modules/nf-core/hdl/rg/environment.yml create mode 100644 modules/nf-core/hdl/rg/main.nf create mode 100644 modules/nf-core/hdl/rg/meta.yml create mode 100644 modules/nf-core/hdl/rg/templates/hdl_rg.R create mode 100644 modules/nf-core/hdl/rg/tests/main.nf.test create mode 100644 modules/nf-core/hdl/rg/tests/nextflow.config diff --git a/modules/nf-core/hdl/h2/environment.yml b/modules/nf-core/hdl/h2/environment.yml new file mode 100644 index 000000000000..cdc13789af23 --- /dev/null +++ b/modules/nf-core/hdl/h2/environment.yml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda + - dnachun +dependencies: + - conda-forge::r-base=4.3.1 + - conda-forge::r-data.table=1.15.4 + - dnachun::r-hdl=1.4.0 diff --git a/modules/nf-core/hdl/h2/main.nf b/modules/nf-core/hdl/h2/main.nf new file mode 100644 index 000000000000..dab3aa721cff --- /dev/null +++ b/modules/nf-core/hdl/h2/main.nf @@ -0,0 +1,35 @@ +process HDL_H2 { + tag "hdl_h2_${meta.id}" + label 'process_medium' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'oras://community.wave.seqera.io/library/r-base_r-data.table_r-hdl:a2553504418194cc' : + 'community.wave.seqera.io/library/r-base_r-data.table_r-hdl:cb9d70356e12d034' }" + + input: + tuple val(meta), path(sumstats) + tuple val(ref_meta), path(hdl_ref_panel_dir) + + output: + tuple val(meta), path("${meta.id}.h2.tsv"), emit: heritability_results + tuple val(meta), path("${meta.id}.hdl.log"), emit: h2_log + tuple val("${task.process}"), val("hdl"), val("1.4.0"), emit: versions_hdl, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + template 'hdl_h2.R' + + stub: + """ + cat < ${meta.id}.h2.tsv +trait\th2\tse\tp\teigen_use +${meta.id}\t0.2100\t0.0300\t0.00010\tautomatic +EOF_STUB + + cat < ${meta.id}.hdl.log +Stub HDL h2 run for ${meta.id} +EOF_STUB + """ +} diff --git a/modules/nf-core/hdl/h2/meta.yml b/modules/nf-core/hdl/h2/meta.yml new file mode 100644 index 000000000000..319a9ed29427 --- /dev/null +++ b/modules/nf-core/hdl/h2/meta.yml @@ -0,0 +1,62 @@ +name: hdl_h2 +description: Estimate SNP heritability from GWAS summary statistics using HDL.h2 +keywords: + - hdl + - heritability + - gwas +tools: + - hdl: + description: High-definition likelihood method for genetic correlation and heritability from summary statistics + homepage: https://github.com/zhenin/HDL + documentation: https://github.com/zhenin/HDL/wiki +input: + - - meta: + type: map + description: Metadata map for the trait input. The `meta.id` value is used to label output files. + - sumstats: + type: file + description: Canonicalized GWAS summary statistics for the trait in `meta.id`. + - - ref_meta: + type: map + description: Metadata map for the HDL reference panel directory. + - hdl_ref_panel_dir: + type: directory + description: Directory containing HDL LD reference panel files. +output: + heritability_results: + - - meta: + type: map + description: Propagated trait metadata map. + - ${meta.id}.h2.tsv: + type: file + description: Tab-delimited HDL heritability summary output. + h2_log: + - - meta: + type: map + description: Propagated trait metadata map. + - ${meta.id}.hdl.log: + type: file + description: HDL heritability run log. + versions_hdl: + - - ${task.process}: + type: string + description: Name of the process + - hdl: + type: string + description: Name of the tool + - 1.4.0: + type: string + description: Version of the HDL R package bundled for the module +topics: + versions: + - - ${task.process}: + type: string + description: Name of the process + - hdl: + type: string + description: Name of the tool + - 1.4.0: + type: string + description: Version of the HDL R package bundled for the module +authors: + - andongni diff --git a/modules/nf-core/hdl/h2/templates/hdl_h2.R b/modules/nf-core/hdl/h2/templates/hdl_h2.R new file mode 100644 index 000000000000..4c2b4892f4ee --- /dev/null +++ b/modules/nf-core/hdl/h2/templates/hdl_h2.R @@ -0,0 +1,41 @@ +#!/usr/bin/env Rscript + +suppressPackageStartupMessages({ + library(data.table) +}) + +parse_hdl_ext_args <- function(raw_ext_args = "${task.ext.args ?: ''}") { + tryCatch( + eval(parse(text = sprintf("list(%s)", raw_ext_args))), + error = function(e) stop(sprintf("Failed to parse task.ext.args as R named arguments: %s", conditionMessage(e))) + ) +} + +if (!requireNamespace("HDL", quietly = TRUE)) { + stop("R package 'HDL' is not installed. Install HDL in the runtime container/environment.") +} + +gwas <- fread("${sumstats}", data.table = FALSE) +hdl_ext_args <- parse_hdl_ext_args() + +call_args <- c( + list( + gwas.df = gwas, + LD.path = "${hdl_ref_panel_dir}", + output.file = "${meta.id}.hdl.log" + ), + hdl_ext_args +) + +result <- do.call(HDL::HDL.h2, call_args) + +out <- data.frame( + trait = "${meta.id}", + h2 = as.numeric(result[["h2"]]), + se = as.numeric(result[["h2.se"]]), + p = as.numeric(result[["P"]]), + eigen_use = as.character(result[["eigen.use"]]), + stringsAsFactors = FALSE +) + +fwrite(out, "${meta.id}.h2.tsv", sep = "\t", quote = FALSE, na = "NA") diff --git a/modules/nf-core/hdl/h2/tests/main.nf.test b/modules/nf-core/hdl/h2/tests/main.nf.test new file mode 100644 index 000000000000..1e9dfbaef739 --- /dev/null +++ b/modules/nf-core/hdl/h2/tests/main.nf.test @@ -0,0 +1,64 @@ +nextflow_process { + + name "Test Process HDL_H2" + script "../main.nf" + config "./nextflow.config" + process "HDL_H2" + tag "modules" + tag "modules_nfcore" + tag "hdl" + tag "hdl/h2" + + test("trait1 - real") { + when { + process { + """ + input[0] = tuple( + [id: "trait1"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + ) + input[1] = tuple( + [id: "hdl_reference"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/reference", checkIfExists: true) + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.heritability_results.size() == 1 }, + { assert process.out.h2_log.size() == 1 }, + { assert process.out.versions_hdl.size() == 1 } + ) + } + } + + test("trait1 - stub") { + options "-stub" + when { + process { + """ + input[0] = tuple( + [id: "trait1"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + ) + input[1] = tuple( + [id: "hdl_reference"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/reference", checkIfExists: true) + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.heritability_results.size() == 1 }, + { assert process.out.h2_log.size() == 1 }, + { assert process.out.versions_hdl.size() == 1 } + ) + } + } +} diff --git a/modules/nf-core/hdl/h2/tests/nextflow.config b/modules/nf-core/hdl/h2/tests/nextflow.config new file mode 100644 index 000000000000..de31e0218829 --- /dev/null +++ b/modules/nf-core/hdl/h2/tests/nextflow.config @@ -0,0 +1,3 @@ +params { + modules_testdata_base_path = System.getenv("NF_MODULES_TESTDATA_BASE_PATH") ?: "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" +} diff --git a/modules/nf-core/hdl/rg/environment.yml b/modules/nf-core/hdl/rg/environment.yml new file mode 100644 index 000000000000..cdc13789af23 --- /dev/null +++ b/modules/nf-core/hdl/rg/environment.yml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda + - dnachun +dependencies: + - conda-forge::r-base=4.3.1 + - conda-forge::r-data.table=1.15.4 + - dnachun::r-hdl=1.4.0 diff --git a/modules/nf-core/hdl/rg/main.nf b/modules/nf-core/hdl/rg/main.nf new file mode 100644 index 000000000000..817660efa5e6 --- /dev/null +++ b/modules/nf-core/hdl/rg/main.nf @@ -0,0 +1,36 @@ +process HDL_RG { + tag "hdl_rg_${meta.id}_${meta2.id}" + label 'process_medium' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'oras://community.wave.seqera.io/library/r-base_r-data.table_r-hdl:a2553504418194cc' : + 'community.wave.seqera.io/library/r-base_r-data.table_r-hdl:cb9d70356e12d034' }" + + input: + tuple val(meta), path(sumstats1) + tuple val(meta2), path(sumstats2) + tuple val(ref_meta), path(hdl_ref_panel_dir) + + output: + tuple val(meta), val(meta2), path("${meta.id}.${meta2.id}.rg.tsv"), emit: correlation_results + tuple val(meta), val(meta2), path("${meta.id}.${meta2.id}.hdl.log"), emit: rg_log + tuple val("${task.process}"), val("hdl"), val("1.4.0"), emit: versions_hdl, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + template 'hdl_rg.R' + + stub: + """ + cat < ${meta.id}.${meta2.id}.rg.tsv +trait1\ttrait2\trg\tse\tp\th2_trait1\th2_trait2\tcovariance\teigen_use +${meta.id}\t${meta2.id}\t0.3500\t0.0700\t0.00001\t0.2000\t0.1800\t0.0600\tautomatic +EOF_STUB + + cat < ${meta.id}.${meta2.id}.hdl.log +Stub HDL rg run for ${meta.id} and ${meta2.id} +EOF_STUB + """ +} diff --git a/modules/nf-core/hdl/rg/meta.yml b/modules/nf-core/hdl/rg/meta.yml new file mode 100644 index 000000000000..0c68292d24f3 --- /dev/null +++ b/modules/nf-core/hdl/rg/meta.yml @@ -0,0 +1,74 @@ +name: hdl_rg +description: Estimate pairwise genetic correlation from GWAS summary statistics using HDL.rg +keywords: + - hdl + - genetic correlation + - gwas +tools: + - hdl: + description: High-definition likelihood method for genetic correlation and heritability from summary statistics + homepage: https://github.com/zhenin/HDL + documentation: https://github.com/zhenin/HDL/wiki +input: + - - meta: + type: map + description: Metadata map for the first trait input. The `meta.id` value is used as the first trait label. + - sumstats1: + type: file + description: Canonicalized GWAS summary statistics for the first trait. + - - meta2: + type: map + description: Metadata map for the second trait input. The `meta2.id` value is used as the second trait label. + - sumstats2: + type: file + description: Canonicalized GWAS summary statistics for the second trait. + - - ref_meta: + type: map + description: Metadata map for the HDL reference panel directory. + - hdl_ref_panel_dir: + type: directory + description: Directory containing HDL LD reference panel files. +output: + correlation_results: + - - meta: + type: map + description: Propagated first-trait metadata map. + - meta2: + type: map + description: Propagated second-trait metadata map. + - ${meta.id}.${meta2.id}.rg.tsv: + type: file + description: Tab-delimited HDL genetic correlation summary output. + rg_log: + - - meta: + type: map + description: Propagated first-trait metadata map. + - meta2: + type: map + description: Propagated second-trait metadata map. + - ${meta.id}.${meta2.id}.hdl.log: + type: file + description: HDL genetic-correlation run log. + versions_hdl: + - - ${task.process}: + type: string + description: Name of the process + - hdl: + type: string + description: Name of the tool + - 1.4.0: + type: string + description: Version of the HDL R package bundled for the module +topics: + versions: + - - ${task.process}: + type: string + description: Name of the process + - hdl: + type: string + description: Name of the tool + - 1.4.0: + type: string + description: Version of the HDL R package bundled for the module +authors: + - andongni diff --git a/modules/nf-core/hdl/rg/templates/hdl_rg.R b/modules/nf-core/hdl/rg/templates/hdl_rg.R new file mode 100644 index 000000000000..a4309563a13e --- /dev/null +++ b/modules/nf-core/hdl/rg/templates/hdl_rg.R @@ -0,0 +1,63 @@ +#!/usr/bin/env Rscript + +suppressPackageStartupMessages({ + library(data.table) +}) + +parse_hdl_ext_args <- function(raw_ext_args = "${task.ext.args ?: ''}") { + tryCatch( + eval(parse(text = sprintf("list(%s)", raw_ext_args))), + error = function(e) stop(sprintf("Failed to parse task.ext.args as R named arguments: %s", conditionMessage(e))) + ) +} + +if (!requireNamespace("HDL", quietly = TRUE)) { + stop("R package 'HDL' is not installed. Install HDL in the runtime container/environment.") +} + +gwas1 <- fread("${sumstats1}", data.table = FALSE) +gwas2 <- fread("${sumstats2}", data.table = FALSE) +hdl_ext_args <- parse_hdl_ext_args() + +call_args <- c( + list( + gwas1.df = gwas1, + gwas2.df = gwas2, + LD.path = "${hdl_ref_panel_dir}", + output.file = "${meta.id}.${meta2.id}.hdl.log" + ), + hdl_ext_args +) + +result <- do.call(HDL::HDL.rg, call_args) + +h1 <- NA_real_ +h2 <- NA_real_ +gcov <- NA_real_ +if (!is.null(result[["estimates.df"]])) { + est <- result[["estimates.df"]] + if ("Heritability_1" %in% rownames(est)) { + h1 <- as.numeric(est["Heritability_1", "Estimate"]) + } + if ("Heritability_2" %in% rownames(est)) { + h2 <- as.numeric(est["Heritability_2", "Estimate"]) + } + if ("Genetic_Covariance" %in% rownames(est)) { + gcov <- as.numeric(est["Genetic_Covariance", "Estimate"]) + } +} + +out <- data.frame( + trait1 = "${meta.id}", + trait2 = "${meta2.id}", + rg = as.numeric(result[["rg"]]), + se = as.numeric(result[["rg.se"]]), + p = as.numeric(result[["P"]]), + h2_trait1 = h1, + h2_trait2 = h2, + covariance = gcov, + eigen_use = as.character(result[["eigen.use"]]), + stringsAsFactors = FALSE +) + +fwrite(out, "${meta.id}.${meta2.id}.rg.tsv", sep = "\t", quote = FALSE, na = "NA") diff --git a/modules/nf-core/hdl/rg/tests/main.nf.test b/modules/nf-core/hdl/rg/tests/main.nf.test new file mode 100644 index 000000000000..bb9c895e8dee --- /dev/null +++ b/modules/nf-core/hdl/rg/tests/main.nf.test @@ -0,0 +1,72 @@ +nextflow_process { + + name "Test Process HDL_RG" + script "../main.nf" + config "./nextflow.config" + process "HDL_RG" + tag "modules" + tag "modules_nfcore" + tag "hdl" + tag "hdl/rg" + + test("trait1 trait2 - real") { + when { + process { + """ + input[0] = tuple( + [id: "trait1"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + ) + input[1] = tuple( + [id: "trait2"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait2_canonical.tsv", checkIfExists: true) + ) + input[2] = tuple( + [id: "hdl_reference"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/reference", checkIfExists: true) + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.correlation_results.size() == 1 }, + { assert process.out.rg_log.size() == 1 }, + { assert process.out.versions_hdl.size() == 1 } + ) + } + } + + test("trait1 trait2 - stub") { + options "-stub" + when { + process { + """ + input[0] = tuple( + [id: "trait1"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + ) + input[1] = tuple( + [id: "trait2"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait2_canonical.tsv", checkIfExists: true) + ) + input[2] = tuple( + [id: "hdl_reference"], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/reference", checkIfExists: true) + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.correlation_results.size() == 1 }, + { assert process.out.rg_log.size() == 1 }, + { assert process.out.versions_hdl.size() == 1 } + ) + } + } +} diff --git a/modules/nf-core/hdl/rg/tests/nextflow.config b/modules/nf-core/hdl/rg/tests/nextflow.config new file mode 100644 index 000000000000..53833e31eaab --- /dev/null +++ b/modules/nf-core/hdl/rg/tests/nextflow.config @@ -0,0 +1,9 @@ +params { + modules_testdata_base_path = System.getenv("NF_MODULES_TESTDATA_BASE_PATH") ?: "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" +} + +process { + withName: "HDL_RG" { + ext.args = "N0 = 0" + } +} From 00ab6e2dc394fdc99a7075188f2be38317907f5d Mon Sep 17 00:00:00 2001 From: lyh970817 Date: Sun, 22 Mar 2026 17:09:55 +0800 Subject: [PATCH 2/2] Retarget HDL tests to shared popgen sumstats --- modules/nf-core/hdl/h2/main.nf | 2 +- modules/nf-core/hdl/h2/meta.yml | 2 +- modules/nf-core/hdl/h2/tests/main.nf.test | 4 ++-- modules/nf-core/hdl/h2/tests/nextflow.config | 5 +++++ modules/nf-core/hdl/rg/main.nf | 2 +- modules/nf-core/hdl/rg/meta.yml | 2 +- modules/nf-core/hdl/rg/tests/main.nf.test | 8 ++++---- modules/nf-core/hdl/rg/tests/nextflow.config | 5 +++++ 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/hdl/h2/main.nf b/modules/nf-core/hdl/h2/main.nf index dab3aa721cff..02b5c811bfb9 100644 --- a/modules/nf-core/hdl/h2/main.nf +++ b/modules/nf-core/hdl/h2/main.nf @@ -8,7 +8,7 @@ process HDL_H2 { input: tuple val(meta), path(sumstats) - tuple val(ref_meta), path(hdl_ref_panel_dir) + tuple val(meta2), path(hdl_ref_panel_dir) output: tuple val(meta), path("${meta.id}.h2.tsv"), emit: heritability_results diff --git a/modules/nf-core/hdl/h2/meta.yml b/modules/nf-core/hdl/h2/meta.yml index 319a9ed29427..4b9daf19ed8d 100644 --- a/modules/nf-core/hdl/h2/meta.yml +++ b/modules/nf-core/hdl/h2/meta.yml @@ -16,7 +16,7 @@ input: - sumstats: type: file description: Canonicalized GWAS summary statistics for the trait in `meta.id`. - - - ref_meta: + - - meta2: type: map description: Metadata map for the HDL reference panel directory. - hdl_ref_panel_dir: diff --git a/modules/nf-core/hdl/h2/tests/main.nf.test b/modules/nf-core/hdl/h2/tests/main.nf.test index 1e9dfbaef739..95968ef5b490 100644 --- a/modules/nf-core/hdl/h2/tests/main.nf.test +++ b/modules/nf-core/hdl/h2/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_process { """ input[0] = tuple( [id: "trait1"], - file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/sumstats/trait1_canonical.tsv", checkIfExists: true) ) input[1] = tuple( [id: "hdl_reference"], @@ -42,7 +42,7 @@ nextflow_process { """ input[0] = tuple( [id: "trait1"], - file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/sumstats/trait1_canonical.tsv", checkIfExists: true) ) input[1] = tuple( [id: "hdl_reference"], diff --git a/modules/nf-core/hdl/h2/tests/nextflow.config b/modules/nf-core/hdl/h2/tests/nextflow.config index de31e0218829..5d012b37dbed 100644 --- a/modules/nf-core/hdl/h2/tests/nextflow.config +++ b/modules/nf-core/hdl/h2/tests/nextflow.config @@ -1,3 +1,8 @@ params { modules_testdata_base_path = System.getenv("NF_MODULES_TESTDATA_BASE_PATH") ?: "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" } + +docker { + enabled = true + runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' +} diff --git a/modules/nf-core/hdl/rg/main.nf b/modules/nf-core/hdl/rg/main.nf index 817660efa5e6..abec740a7bc4 100644 --- a/modules/nf-core/hdl/rg/main.nf +++ b/modules/nf-core/hdl/rg/main.nf @@ -9,7 +9,7 @@ process HDL_RG { input: tuple val(meta), path(sumstats1) tuple val(meta2), path(sumstats2) - tuple val(ref_meta), path(hdl_ref_panel_dir) + tuple val(meta3), path(hdl_ref_panel_dir) output: tuple val(meta), val(meta2), path("${meta.id}.${meta2.id}.rg.tsv"), emit: correlation_results diff --git a/modules/nf-core/hdl/rg/meta.yml b/modules/nf-core/hdl/rg/meta.yml index 0c68292d24f3..6264d4ea85ac 100644 --- a/modules/nf-core/hdl/rg/meta.yml +++ b/modules/nf-core/hdl/rg/meta.yml @@ -22,7 +22,7 @@ input: - sumstats2: type: file description: Canonicalized GWAS summary statistics for the second trait. - - - ref_meta: + - - meta3: type: map description: Metadata map for the HDL reference panel directory. - hdl_ref_panel_dir: diff --git a/modules/nf-core/hdl/rg/tests/main.nf.test b/modules/nf-core/hdl/rg/tests/main.nf.test index bb9c895e8dee..6600df081b9b 100644 --- a/modules/nf-core/hdl/rg/tests/main.nf.test +++ b/modules/nf-core/hdl/rg/tests/main.nf.test @@ -15,11 +15,11 @@ nextflow_process { """ input[0] = tuple( [id: "trait1"], - file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/sumstats/trait1_canonical.tsv", checkIfExists: true) ) input[1] = tuple( [id: "trait2"], - file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait2_canonical.tsv", checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/sumstats/trait2_canonical.tsv", checkIfExists: true) ) input[2] = tuple( [id: "hdl_reference"], @@ -46,11 +46,11 @@ nextflow_process { """ input[0] = tuple( [id: "trait1"], - file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait1_canonical.tsv", checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/sumstats/trait1_canonical.tsv", checkIfExists: true) ) input[1] = tuple( [id: "trait2"], - file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/hdl/sumstats/trait2_canonical.tsv", checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/sumstats/trait2_canonical.tsv", checkIfExists: true) ) input[2] = tuple( [id: "hdl_reference"], diff --git a/modules/nf-core/hdl/rg/tests/nextflow.config b/modules/nf-core/hdl/rg/tests/nextflow.config index 53833e31eaab..8ada1ec0b298 100644 --- a/modules/nf-core/hdl/rg/tests/nextflow.config +++ b/modules/nf-core/hdl/rg/tests/nextflow.config @@ -2,6 +2,11 @@ params { modules_testdata_base_path = System.getenv("NF_MODULES_TESTDATA_BASE_PATH") ?: "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" } +docker { + enabled = true + runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' +} + process { withName: "HDL_RG" { ext.args = "N0 = 0"