From 4da859ff9e64c15b14c0093d55b0ab277e338b1f Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 31 Dec 2024 20:49:42 +0000 Subject: [PATCH 1/3] added nf-tests to gsea_gsea POC --- modules/nf-core/gsea/gsea/main.nf | 81 ++- modules/nf-core/gsea/gsea/tests/main.nf.test | 67 +++ .../nf-core/gsea/gsea/tests/main.nf.test.snap | 550 ++++++++++++++++++ workflows/differentialabundance.nf | 4 + 4 files changed, 672 insertions(+), 30 deletions(-) create mode 100644 modules/nf-core/gsea/gsea/tests/main.nf.test create mode 100644 modules/nf-core/gsea/gsea/tests/main.nf.test.snap diff --git a/modules/nf-core/gsea/gsea/main.nf b/modules/nf-core/gsea/gsea/main.nf index 6a060c46..bd07bef4 100644 --- a/modules/nf-core/gsea/gsea/main.nf +++ b/modules/nf-core/gsea/gsea/main.nf @@ -4,8 +4,8 @@ process GSEA_GSEA { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gsea:4.3.2--hdfd78af_0': - 'biocontainers/gsea:4.3.2--hdfd78af_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/0f/0f4fe28961396eeeaa98484cb4f2db5c79abfdf117700df132312fe5c41bff81/data': + 'community.wave.seqera.io/library/gsea:4.3.2--a7421d7504fd7c81' }" input: tuple val(meta), path(gct), path(cls), path(gene_sets) @@ -13,42 +13,38 @@ process GSEA_GSEA { path(chip) // Optional identifier mapping file output: - tuple val(meta), path("*.rpt") , emit: rpt - tuple val(meta), path("*index.html") , emit: index_html - tuple val(meta), path("*heat_map_corr_plot.html") , emit: heat_map_corr_plot - tuple val(meta), path("*gsea_report_for_${reference}.tsv") , emit: report_tsvs_ref - tuple val(meta), path("*gsea_report_for_${reference}.html"), emit: report_htmls_ref - tuple val(meta), path("*gsea_report_for_${target}.tsv") , emit: report_tsvs_target - tuple val(meta), path("*gsea_report_for_${target}.html") , emit: report_htmls_target - tuple val(meta), path("*ranked_gene_list*.tsv") , emit: ranked_gene_list - tuple val(meta), path("*gene_set_sizes.tsv") , emit: gene_set_sizes - tuple val(meta), path("*global_es_histogram.png") , emit: histogram - tuple val(meta), path("*heat_map_1.png") , emit: heatmap - tuple val(meta), path("*pvalues_vs_nes_plot.png") , emit: pvalues_vs_nes_plot - tuple val(meta), path("*ranked_list_corr_2.png") , emit: ranked_list_corr - tuple val(meta), path("*butterfly_plot.png") , emit: butterfly_plot, optional: true - tuple val(meta), path("*[!gene_set_size|gsea_report|ranked_gene_list]*.tsv"), emit: gene_set_tsv, optional: true - tuple val(meta), path("*[!gsea_report|heat_map_corr_plot|index|pos_snapshot|neg_snapshot]*.html"), emit: gene_set_html, optional: true + tuple val(meta), path("*.rpt") , emit: rpt + tuple val(meta), path("*index.html") , emit: index_html + tuple val(meta), path("*heat_map_corr_plot.html") , emit: heat_map_corr_plot + tuple val(meta), path("*gsea_report_for_${reference}.tsv") , emit: report_tsvs_ref + tuple val(meta), path("*gsea_report_for_${reference}.html") , emit: report_htmls_ref + tuple val(meta), path("*gsea_report_for_${target}.tsv") , emit: report_tsvs_target + tuple val(meta), path("*gsea_report_for_${target}.html") , emit: report_htmls_target + tuple val(meta), path("*ranked_gene_list*.tsv") , emit: ranked_gene_list + tuple val(meta), path("*gene_set_sizes.tsv") , emit: gene_set_sizes + tuple val(meta), path("*global_es_histogram.png") , emit: histogram + tuple val(meta), path("*heat_map_1.png") , emit: heatmap + tuple val(meta), path("*pvalues_vs_nes_plot.png") , emit: pvalues_vs_nes_plot + tuple val(meta), path("*ranked_list_corr_2.png") , emit: ranked_list_corr + tuple val(meta), path("*butterfly_plot.png") , emit: butterfly_plot, optional: true + tuple val(meta), path("*[!gene_set_size|gsea_report|ranked_gene_list]*.tsv") , emit: gene_set_tsv, optional: true + tuple val(meta), path("*[!gsea_report|heat_map_corr_plot|index|pos_snapshot|neg_snapshot]*.html") , emit: gene_set_html, optional: true tuple val(meta), path("*[!butterfly|enplot|global_es_histogram|gset_rnd_es_dist|heat_map|pvalues_vs_nes_plot|ranked_list_corr]*.png"), emit: gene_set_heatmap, optional: true - tuple val(meta), path("*_snapshot*.html") , emit: snapshot, optional: true - tuple val(meta), path("*enplot*.png") , emit: gene_set_enplot, optional: true - tuple val(meta), path("*gset_rnd_es_dist*.png") , emit: gene_set_dist, optional: true - tuple val(meta), path("*.zip") , emit: archive, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path("*_snapshot*.html") , emit: snapshot, optional: true + tuple val(meta), path("*enplot*.png") , emit: gene_set_enplot, optional: true + tuple val(meta), path("*gset_rnd_es_dist*.png") , emit: gene_set_dist, optional: true + tuple val(meta), path("*.zip") , emit: archive, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def VERSION = '4.3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - - // Remove any trailing dots from prefix when passed as report label, so - // GSEA doesn't produce double-dotted top-level outputs - def rpt_label = prefix.replaceAll('\\.$', '') - + def rpt_label = prefix.replaceAll('\\.$', '') // Remove any trailing dots from prefix when passed as report label, so GSEA doesn't produce double-dotted top-level outputs def chip_command = chip ? "-chip $chip -collapse true" : '' + """ # Run GSEA @@ -78,9 +74,34 @@ process GSEA_GSEA { sed -i.bak "s/\$f/${prefix}\${f}/g" *.rpt *.html && rm *.bak done + #Version command uses both conda and micromamba so that it works with both wave containers and conda environments + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gsea: \$((eval "\$(micromamba shell hook --shell bash)" && micromamba activate && (conda list gsea 2>/dev/null || micromamba list 2>/dev/null | grep -i 'gsea')) | awk '\$1 == "gsea" {print \$2}') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.rpt + touch ${prefix}.index.html + touch ${prefix}.heat_map_corr_plot.html + touch ${prefix}.gsea_report_for_${reference}.tsv + touch ${prefix}.gsea_report_for_${reference}.html + touch ${prefix}.gsea_report_for_${target}.tsv + touch ${prefix}.gsea_report_for_${target}.html + touch ${prefix}.ranked_gene_list*.tsv + touch ${prefix}.gene_set_sizes.tsv + touch ${prefix}.global_es_histogram.png + touch ${prefix}.heat_map_1.png + touch ${prefix}.pvalues_vs_nes_plot.png + touch ${prefix}.ranked_list_corr_2.png + + #Version command uses both conda and micromamba so that it works with both wave containers and conda environments cat <<-END_VERSIONS > versions.yml "${task.process}": - gsea: $VERSION + gsea: \$((eval "\$(micromamba shell hook --shell bash)" && micromamba activate && (conda list gsea 2>/dev/null || micromamba list 2>/dev/null | grep -i 'gsea')) | awk '\$1 == "gsea" {print \$2}') END_VERSIONS """ } diff --git a/modules/nf-core/gsea/gsea/tests/main.nf.test b/modules/nf-core/gsea/gsea/tests/main.nf.test new file mode 100644 index 00000000..d7350b31 --- /dev/null +++ b/modules/nf-core/gsea/gsea/tests/main.nf.test @@ -0,0 +1,67 @@ +nextflow_process { + + name "Test Process GSEA_GSEA" + script "../main.nf" + process "GSEA_GSEA" + tag "modules" + tag "modules_nfcore" + tag "gsea_gsea" + + test("test") { + + when { + process { + """ + input[0] = [['id':'Condition_genotype_WT_KO', 'variable':'Condition genotype', 'reference':'WT', 'target':'KO', 'blocking':'batch'], file("/workspace/differentialabundance/testing/run/work/2c/f6c7f62889590c3ae1b52db998728f/Condition_treatment_Control_Treated.gct", checkIfExists:true), file("/workspace/differentialabundance/testing/run/work/31/2fa7ada1c22b172fc41107b62316a0/Condition_genotype_WT_KO.cls", checkIfExists:true), file("https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/mus_musculus/gene_set_analysis/mh.all.v2022.1.Mm.symbols.gmt", checkIfExists:true)] + input[1] = ['WT', 'KO'] + input[2] = file("/workspace/differentialabundance/testing/run/work/74/240694b8064e3ff37bf084b8df164c/study.chip", checkIfExists:true) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.rpt.collect{ meta,rpt -> file(rpt).name }, //assert unstable file, + process.out.index_html.collect{ meta,index_html -> file(index_html).name }, //assert unstable file + process.out.heat_map_corr_plot, + process.out.report_tsvs_ref.collect{ meta,report_tsvs_ref -> file(report_tsvs_ref).name }, + process.out.report_htmls_ref.collect{ meta,report_htmls_ref -> file(report_htmls_ref).name }, //assert unstable file + process.out.report_tsvs_target.collect{ meta,report_tsvs_target -> file(report_tsvs_target).name }, //assert unstable file + process.out.report_htmls_target.collect{ meta,report_htmls_target -> file(report_htmls_target).name }, //assert unstable file + process.out.ranked_gene_list.collect{ meta,ranked_gene_list -> file(ranked_gene_list).name }, //assert unstable file + process.out.gene_set_sizes, + process.out.histogram.collect{ meta,histogram -> file(histogram).name }, //assert unstable file + process.out.heatmap, + process.out.pvalues_vs_nes_plot.collect{ meta,pvalues_vs_nes_plot -> file(pvalues_vs_nes_plot).name }, //assert unstable file + process.out.ranked_list_corr, + process.out.versions + ).match() + } + ) + } + } + + test("stub") { + + options "-stub" + + when { + process { + """ + input[0] = [['id':'Condition_genotype_WT_KO', 'variable':'Condition genotype', 'reference':'WT', 'target':'KO', 'blocking':'batch'], file("/workspace/differentialabundance/testing/run/work/2c/f6c7f62889590c3ae1b52db998728f/Condition_treatment_Control_Treated.gct", checkIfExists:true), file("/workspace/differentialabundance/testing/run/work/31/2fa7ada1c22b172fc41107b62316a0/Condition_genotype_WT_KO.cls", checkIfExists:true), file("https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/mus_musculus/gene_set_analysis/mh.all.v2022.1.Mm.symbols.gmt", checkIfExists:true)] + input[1] = ['WT', 'KO'] + input[2] = file("/workspace/differentialabundance/testing/run/work/74/240694b8064e3ff37bf084b8df164c/study.chip", checkIfExists:true) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } +} diff --git a/modules/nf-core/gsea/gsea/tests/main.nf.test.snap b/modules/nf-core/gsea/gsea/tests/main.nf.test.snap new file mode 100644 index 00000000..7e17b1b9 --- /dev/null +++ b/modules/nf-core/gsea/gsea/tests/main.nf.test.snap @@ -0,0 +1,550 @@ +{ + "test": { + "content": [ + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.Gsea.rpt" + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.index.html" + ], + [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.heat_map_corr_plot.html:md5,bbee57fdc468828dd90d6beb0754d345" + ] + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.gsea_report_for_WT.tsv" + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.gsea_report_for_WT.html" + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.gsea_report_for_KO.tsv" + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.gsea_report_for_KO.html" + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.ranked_gene_list_KO_versus_WT.tsv" + ], + [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.gene_set_sizes.tsv:md5,61ca77f6b13620a78170c0b9366b8425" + ] + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.global_es_histogram.png" + ], + [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.heat_map_1.png:md5,113956d1605eb030a6d14f9bde82f662" + ] + ], + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.pvalues_vs_nes_plot.png" + ], + [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols.ranked_list_corr_2.png:md5,077e0ac773aea8df7cd192de191a3c97" + ] + ], + [ + "versions.yml:md5,957596d9ab6aad1125546a4279696a38" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2024-12-31T16:31:51.022704766" + }, + "stub": { + "content": [ + { + "0": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..rpt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..index.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_1.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..pvalues_vs_nes_plot.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_list_corr_2.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "13": [ + + ], + "14": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gene_set_sizes.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_gene_list*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "15": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_corr_plot.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..index.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "16": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..global_es_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_1.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..pvalues_vs_nes_plot.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_list_corr_2.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "17": [ + + ], + "18": [ + + ], + "19": [ + + ], + "2": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_corr_plot.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "20": [ + + ], + "21": [ + "versions.yml:md5,957596d9ab6aad1125546a4279696a38" + ], + "3": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_gene_list*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gene_set_sizes.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "9": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..global_es_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "archive": [ + + ], + "butterfly_plot": [ + + ], + "gene_set_dist": [ + + ], + "gene_set_enplot": [ + + ], + "gene_set_heatmap": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..global_es_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_1.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..pvalues_vs_nes_plot.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_list_corr_2.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "gene_set_html": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_corr_plot.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..index.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "gene_set_sizes": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gene_set_sizes.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gene_set_tsv": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + [ + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gene_set_sizes.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_gene_list*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "heat_map_corr_plot": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_corr_plot.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "heatmap": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..heat_map_1.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "histogram": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..global_es_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "index_html": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..index.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "pvalues_vs_nes_plot": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..pvalues_vs_nes_plot.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ranked_gene_list": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_gene_list*.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ranked_list_corr": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..ranked_list_corr_2.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "report_htmls_ref": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "report_htmls_target": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "report_tsvs_ref": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_WT.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "report_tsvs_target": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..gsea_report_for_KO.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "rpt": [ + [ + { + "id": "Condition_genotype_WT_KO", + "variable": "Condition genotype", + "reference": "WT", + "target": "KO", + "blocking": "batch" + }, + "Condition_genotype_WT_KO.mh.all.v2022.1.Mm.symbols..rpt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "snapshot": [ + + ], + "versions": [ + "versions.yml:md5,957596d9ab6aad1125546a4279696a38" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2024-12-31T16:10:11.556263305" + } +} \ No newline at end of file diff --git a/workflows/differentialabundance.nf b/workflows/differentialabundance.nf index 707395dc..c26103ca 100644 --- a/workflows/differentialabundance.nf +++ b/workflows/differentialabundance.nf @@ -493,6 +493,10 @@ workflow DIFFERENTIALABUNDANCE { .map{ tuple(it[1], it[0], it[2]) } .combine(ch_gene_sets) + ch_gsea_inputs.dump(tag:"ch_gsea_inputs1") + ch_gsea_inputs.map{ tuple(it[0].reference, it[0].target) }.dump(tag:"ch_gsea_inputs2") + CUSTOM_TABULARTOGSEACHIP.out.chip.first().map{ it[1] }.dump(tag:"CUSTOM_TABULARTOGSEACHIP3") + GSEA_GSEA( ch_gsea_inputs, ch_gsea_inputs.map{ tuple(it[0].reference, it[0].target) }, // * From 7daa8991ba7db2d57d5243452f6263e73d561931 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 31 Dec 2024 20:51:10 +0000 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c739194c..9c11a951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [[#380](https://github.com/nf-core/differentialabundance/pull/380)] - Replace local filter_diff_table module with nf-core one, and create nf-tests for tabular_to_gsea_chip. ([@nschcolnicov](https://github.com/nschcolnicov), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#382](https://github.com/nf-core/differentialabundance/pull/382)] - Add YAML formatted contrasts file handling. ([@nschcolnicov](https://github.com/nschcolnicov), review by [@TODO](https://github.com/TODO)) - [[#411](https://github.com/nf-core/differentialabundance/pull/411)] - Replace local tabulartogseachip with nf-core version. ([@nschcolnicov](https://github.com/nschcolnicov), review by [@TODO](https://github.com/TODO)) +- [[#417](https://github.com/nf-core/differentialabundance/pull/417)] - Update gsea/gsea module to add nf-tests. ([@nschcolnicov](https://github.com/nschcolnicov), review by [@TODO](https://github.com/TODO)) ### Fixed From 3bddf3a8cfb70750f733f7744aee3cd00472e1b6 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 31 Dec 2024 21:46:53 +0000 Subject: [PATCH 3/3] Revert dumps --- workflows/differentialabundance.nf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/workflows/differentialabundance.nf b/workflows/differentialabundance.nf index c26103ca..707395dc 100644 --- a/workflows/differentialabundance.nf +++ b/workflows/differentialabundance.nf @@ -493,10 +493,6 @@ workflow DIFFERENTIALABUNDANCE { .map{ tuple(it[1], it[0], it[2]) } .combine(ch_gene_sets) - ch_gsea_inputs.dump(tag:"ch_gsea_inputs1") - ch_gsea_inputs.map{ tuple(it[0].reference, it[0].target) }.dump(tag:"ch_gsea_inputs2") - CUSTOM_TABULARTOGSEACHIP.out.chip.first().map{ it[1] }.dump(tag:"CUSTOM_TABULARTOGSEACHIP3") - GSEA_GSEA( ch_gsea_inputs, ch_gsea_inputs.map{ tuple(it[0].reference, it[0].target) }, // *