From 7f42c406f5d00521c2af8c6c83e945e689c51614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Sch=C3=B6nherr?= Date: Mon, 29 Sep 2025 12:48:58 +0200 Subject: [PATCH 1/3] Create QC stats on specified samples #114 --- modules/local/qc_filter_genotyped.nf | 2 ++ nextflow.config | 2 -- workflows/gene_based_tests.nf | 2 +- workflows/quality_control.nf | 6 ++++-- workflows/single_variant_tests.nf | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/local/qc_filter_genotyped.nf b/modules/local/qc_filter_genotyped.nf index 465e0d32..3064e98a 100644 --- a/modules/local/qc_filter_genotyped.nf +++ b/modules/local/qc_filter_genotyped.nf @@ -4,6 +4,7 @@ process QC_FILTER_GENOTYPED { input: tuple val(genotyped_plink_filename), path(genotyped_plink_file) + path phenotypes_file output: path "${genotyped_plink_filename}.qc.log" @@ -15,6 +16,7 @@ process QC_FILTER_GENOTYPED { """ plink2 \ --bfile ${genotyped_plink_filename} \ + --keep ${phenotypes_file} \ --maf ${params.qc_maf} \ --mac ${params.qc_mac} \ --geno ${params.qc_geno} \ diff --git a/nextflow.config b/nextflow.config index 06c3e251..64ec6b6f 100644 --- a/nextflow.config +++ b/nextflow.config @@ -126,7 +126,6 @@ profiles { docker { docker.enabled = true - docker.userEmulation = true singularity.enabled = false } @@ -139,7 +138,6 @@ profiles { development { process.container = 'genepi/nf-gwas:latest' docker.enabled = true - docker.userEmulation = true resume = true singularity.enabled = false } diff --git a/workflows/gene_based_tests.nf b/workflows/gene_based_tests.nf index 22bc11eb..2972e5e1 100644 --- a/workflows/gene_based_tests.nf +++ b/workflows/gene_based_tests.nf @@ -66,7 +66,7 @@ workflow GENE_BASED_TESTS { if (!skip_predictions) { - QUALITY_CONTROL(genotyped_plink_ch) + QUALITY_CONTROL(genotyped_plink_ch, phenotypes_file_validated) genotyped_final_ch = QUALITY_CONTROL.out.genotyped_filtered_files_ch genotyped_filtered_snplist_ch = QUALITY_CONTROL.out.genotyped_filtered_snplist_ch genotyped_filtered_id_ch = QUALITY_CONTROL.out.genotyped_filtered_id_ch diff --git a/workflows/quality_control.nf b/workflows/quality_control.nf index c025330d..a5239dfa 100644 --- a/workflows/quality_control.nf +++ b/workflows/quality_control.nf @@ -3,12 +3,14 @@ include { QC_FILTER_GENOTYPED } from '../modules/local/qc_filter_genotyped' workflow QUALITY_CONTROL { take: - genotyped_plink_ch + genotyped_plink_ch + phenotypes_file_validated main: QC_FILTER_GENOTYPED ( - genotyped_plink_ch + genotyped_plink_ch, + phenotypes_file_validated ) emit: diff --git a/workflows/single_variant_tests.nf b/workflows/single_variant_tests.nf index 29c34736..67c2e7aa 100644 --- a/workflows/single_variant_tests.nf +++ b/workflows/single_variant_tests.nf @@ -58,7 +58,7 @@ workflow SINGLE_VARIANT_TESTS { if (!skip_predictions) { - QUALITY_CONTROL(genotyped_plink_ch) + QUALITY_CONTROL(genotyped_plink_ch, phenotypes_file_validated) genotyped_final_ch = QUALITY_CONTROL.out.genotyped_filtered_files_ch genotyped_filtered_snplist_ch = QUALITY_CONTROL.out.genotyped_filtered_snplist_ch genotyped_filtered_id_ch = QUALITY_CONTROL.out.genotyped_filtered_id_ch From 2add72bd83f7fd7fe501b4efdd968df70f4a09db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Sch=C3=B6nherr?= Date: Mon, 29 Sep 2025 13:23:09 +0200 Subject: [PATCH 2/3] Update ci-tests.yml --- .github/workflows/ci-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index d8b90b10..514a966c 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Nextflow uses: nf-core/setup-nextflow@v1 with: - version: "latest-edge" + version: "latest-stable" - name: Install nf-test run: | From efa7a671114e54e65c4fe28841b815fc71d5159f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Sch=C3=B6nherr?= Date: Mon, 29 Sep 2025 13:35:10 +0200 Subject: [PATCH 3/3] Fix test case --- tests/modules/local/qc_filter_genotyped.nf.test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/modules/local/qc_filter_genotyped.nf.test b/tests/modules/local/qc_filter_genotyped.nf.test index 9f5de109..bbd2d16d 100644 --- a/tests/modules/local/qc_filter_genotyped.nf.test +++ b/tests/modules/local/qc_filter_genotyped.nf.test @@ -11,6 +11,7 @@ nextflow_process { process { """ input[0] = Channel.fromFilePairs("$projectDir/tests/input/pipeline/example.{bim,bed,fam}", size: 3) + input[1] = file("$projectDir/tests/input/pipeline/phenotype.txt") """ } }