From b308ac05c09212f993129c19d64923a7632026bc Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 14:56:04 +0000 Subject: [PATCH 01/12] Add control feature handling for deseq2 --- modules/nf-core/deseq2/differential/main.nf | 1 + .../deseq2/differential/templates/deseq_de.R | 7 +++ .../nf-core/deseq2/differential/main.nf | 62 ++++++++++++++++++- .../deseq2/differential/nextflow.config | 3 + .../nf-core/deseq2/differential/test.yml | 31 +++++++++- 5 files changed, 98 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/deseq2/differential/main.nf b/modules/nf-core/deseq2/differential/main.nf index 3ebf9fbfd9c..19a16359590 100644 --- a/modules/nf-core/deseq2/differential/main.nf +++ b/modules/nf-core/deseq2/differential/main.nf @@ -9,6 +9,7 @@ process DESEQ2_DIFFERENTIAL { input: tuple val(meta), path(samplesheet), path(counts) + tuple val(control_genes_meta), path(control_genes_file) output: tuple val(meta), path("*.deseq2.results.tsv") , emit: results diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 5e1cd307b7b..3d4a9d74d9b 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -95,6 +95,7 @@ opt <- list( reference_level = NULL, treatment_level = NULL, blocking_variables = NULL, + control_genes_file = '$control_genes_file', gene_id_col = "gene_id", sample_id_col = "experiment_accession", test = "Wald", @@ -274,6 +275,12 @@ dds <- DESeqDataSetFromMatrix( design = as.formula(model) ) +if (opt\$control_genes_file != ''){ + control_genes <- readLines(opt\$control_genes_file) + print(paste('Estimating size factors using', length(control_genes), 'control genes')) + dds <- estimateSizeFactors(dds, controlGenes=rownames(count.table) %in% control_genes) +} + dds <- DESeq( dds, test = opt\$test, diff --git a/tests/modules/nf-core/deseq2/differential/main.nf b/tests/modules/nf-core/deseq2/differential/main.nf index 0420fa8ae13..d0d75463d09 100644 --- a/tests/modules/nf-core/deseq2/differential/main.nf +++ b/tests/modules/nf-core/deseq2/differential/main.nf @@ -20,6 +20,27 @@ process tsv_to_csv { } +// Take the first 50 genes and pretend they're spikes for testing control gene +// functionality + +process spoof_spikes { + + input: + path expression_matrix + + output: + path 'spikes.txt' + + script: + """ + head -n 50 $expression_matrix | \ + tail -n +2 | \ + awk '{print \$1}' > spikes.txt.tmp + mv spikes.txt.tmp spikes.txt + """ +} +empty_spikes = [[],[]] + workflow test_deseq2_differential { expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) @@ -36,7 +57,40 @@ workflow test_deseq2_differential { } DESEQ2_DIFFERENTIAL ( - input + input, + empty_spikes + ) +} + +// Try with spikes as control genes + +workflow test_deseq2_differential_spikes { + + expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) + expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) + expression_contrasts = file(params.test_data['mus_musculus']['genome']['rnaseq_contrasts'], checkIfExists: true) + + Channel.fromPath(expression_contrasts) + .splitCsv ( header:true, sep:',' ) + .map{ + tuple(it, expression_sample_sheet, expression_matrix_file) + } + .set{ + input + } + + // Make our fake spikes and pretent they're ERCC controls + + spoof_spikes(expression_matrix_file) + .map{ + tuple(['id':'ERCC'], it) + }.set{ + ch_spikes + } + + DESEQ2_DIFFERENTIAL ( + input, + ch_spikes ) } @@ -58,7 +112,8 @@ workflow test_deseq2_differential_csv { .splitCsv ( header:true, sep:',' ) DESEQ2_DIFFERENTIAL ( - ch_contrasts.combine(ch_samples_and_matrix) + ch_contrasts.combine(ch_samples_and_matrix), + empty_spikes ) } @@ -80,6 +135,7 @@ workflow test_deseq2_differential_vst_nsub { } DESEQ2_DIFFERENTIAL ( - input + input, + empty_spikes ) } diff --git a/tests/modules/nf-core/deseq2/differential/nextflow.config b/tests/modules/nf-core/deseq2/differential/nextflow.config index 8e732f15d28..2db1adb1af4 100644 --- a/tests/modules/nf-core/deseq2/differential/nextflow.config +++ b/tests/modules/nf-core/deseq2/differential/nextflow.config @@ -5,6 +5,9 @@ process { withName: 'test_deseq2_differential:DESEQ2_DIFFERENTIAL' { ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } } + withName: 'test_deseq2_differential_spikes:DESEQ2_DIFFERENTIAL' { + ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } + } withName: 'test_deseq2_differential_csv:DESEQ2_DIFFERENTIAL' { ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } } diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index 8f062d9e37e..b9dbe681aa1 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -1,8 +1,8 @@ - name: deseq2 differential test_deseq2_differential command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 86f0312a4691dfb4d7c15643059d8fb8 @@ -21,11 +21,36 @@ - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv md5sum: 1077cf03a8c6a155932eaaed7415b74c +- name: deseq2 differential test_deseq2_differential_spikes + command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config + tags: + - deseq2/differential + - deseq2 + files: + - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv + md5sum: 150a32eef482244b47ddc7f7ffb1ad2a + - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv + md5sum: 1708374146b4e8c28fbc78fa292102cd + - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv + md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 + - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv + md5sum: c28300837df9ca6adeba2a52ea5e181e + - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv + md5sum: 88b3230c5a4ad8717c1d0b38c824f1fc + - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv + md5sum: 1708374146b4e8c28fbc78fa292102cd + - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv + md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 + - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv + md5sum: c28300837df9ca6adeba2a52ea5e181e + - path: output/spoof/spikes.txt + md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc + - name: deseq2 differential test_deseq2_differential_csv command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_csv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 86f0312a4691dfb4d7c15643059d8fb8 @@ -49,8 +74,8 @@ - name: deseq2 differential test_deseq2_differential_vst_nsub command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_vst_nsub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 86f0312a4691dfb4d7c15643059d8fb8 From d9601746787cc745d56747f16c5134df571b23cd Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 14:59:40 +0000 Subject: [PATCH 02/12] Update docs for control genes --- modules/nf-core/deseq2/differential/meta.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/nf-core/deseq2/differential/meta.yml b/modules/nf-core/deseq2/differential/meta.yml index 2625a3e8335..200cacf35ee 100644 --- a/modules/nf-core/deseq2/differential/meta.yml +++ b/modules/nf-core/deseq2/differential/meta.yml @@ -31,6 +31,14 @@ input: calls at the pipeline level e.g. [ variable:'treatment', reference:'treated', control:'saline', blocking:'' ] passed in as ext.args like: '--reference_level $meta.reference --treatment_level $meta.target' + - control_genes: + type: file + description: | + Text file listing control genes, one per line + - control_genes_meta: + type: file + description: | + Meta map describing control genes, e.g. [ id: 'ERCC' ] output: - results: From ddbcd7c3087db1d63bcc42312fb0221bbf195130 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 15:06:19 +0000 Subject: [PATCH 03/12] Appease eclint --- modules/nf-core/deseq2/differential/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/deseq2/differential/main.nf b/modules/nf-core/deseq2/differential/main.nf index 19a16359590..6221c7854ab 100644 --- a/modules/nf-core/deseq2/differential/main.nf +++ b/modules/nf-core/deseq2/differential/main.nf @@ -9,7 +9,7 @@ process DESEQ2_DIFFERENTIAL { input: tuple val(meta), path(samplesheet), path(counts) - tuple val(control_genes_meta), path(control_genes_file) + tuple val(control_genes_meta), path(control_genes_file) output: tuple val(meta), path("*.deseq2.results.tsv") , emit: results From 9ca07bdc2afea756772bf2c8c7ea8a9cfc80b6b4 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 15:44:47 +0000 Subject: [PATCH 04/12] Allow stripping of spikes when not being used for normalisation --- .../nf-core/deseq2/differential/templates/deseq_de.R | 11 +++++++++-- .../nf-core/deseq2/differential/nextflow.config | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 3d4a9d74d9b..67448d6d7d2 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -96,6 +96,7 @@ opt <- list( treatment_level = NULL, blocking_variables = NULL, control_genes_file = '$control_genes_file', + sizefactors_from_controls = FALSE, gene_id_col = "gene_id", sample_id_col = "experiment_accession", test = "Wald", @@ -269,14 +270,20 @@ model <- paste(model, opt\$contrast_variable, sep = ' + ') ################################################ ################################################ +if (opt\$control_genes_file != ''){ + control_genes <- readLines(opt\$control_genes_file) + if (! opt\$sizefactors_from_controls){ + count_table <- count_table[setdiff(rownames(count_table), control_genes),] + } +} + dds <- DESeqDataSetFromMatrix( countData = round(count.table), colData = sample.sheet, design = as.formula(model) ) -if (opt\$control_genes_file != ''){ - control_genes <- readLines(opt\$control_genes_file) +if (opt\$control_genes_file != '' && opt\$sizefactors_from_controls){ print(paste('Estimating size factors using', length(control_genes), 'control genes')) dds <- estimateSizeFactors(dds, controlGenes=rownames(count.table) %in% control_genes) } diff --git a/tests/modules/nf-core/deseq2/differential/nextflow.config b/tests/modules/nf-core/deseq2/differential/nextflow.config index 2db1adb1af4..dae3c74e82c 100644 --- a/tests/modules/nf-core/deseq2/differential/nextflow.config +++ b/tests/modules/nf-core/deseq2/differential/nextflow.config @@ -6,7 +6,7 @@ process { ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } } withName: 'test_deseq2_differential_spikes:DESEQ2_DIFFERENTIAL' { - ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } + ext.args = { "--sizefactors_from_controls TRUE --contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } } withName: 'test_deseq2_differential_csv:DESEQ2_DIFFERENTIAL' { ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } From 2adf0643638f503d141963ab75db895b6aeefec9 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 16:24:50 +0000 Subject: [PATCH 05/12] Add test for spike stripping --- .../deseq2/differential/templates/deseq_de.R | 2 +- .../nf-core/deseq2/differential/main.nf | 34 ++++++++++++++++++- .../deseq2/differential/nextflow.config | 3 ++ .../nf-core/deseq2/differential/test.yml | 33 +++++++++++++++--- 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 67448d6d7d2..0aa0979e752 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -273,7 +273,7 @@ model <- paste(model, opt\$contrast_variable, sep = ' + ') if (opt\$control_genes_file != ''){ control_genes <- readLines(opt\$control_genes_file) if (! opt\$sizefactors_from_controls){ - count_table <- count_table[setdiff(rownames(count_table), control_genes),] + count.table <- count.table[setdiff(rownames(count.table), control_genes),] } } diff --git a/tests/modules/nf-core/deseq2/differential/main.nf b/tests/modules/nf-core/deseq2/differential/main.nf index d0d75463d09..2330494f673 100644 --- a/tests/modules/nf-core/deseq2/differential/main.nf +++ b/tests/modules/nf-core/deseq2/differential/main.nf @@ -79,7 +79,39 @@ workflow test_deseq2_differential_spikes { input } - // Make our fake spikes and pretent they're ERCC controls + // Make our fake spikes and pretend they're ERCC controls + + spoof_spikes(expression_matrix_file) + .map{ + tuple(['id':'ERCC'], it) + }.set{ + ch_spikes + } + + DESEQ2_DIFFERENTIAL ( + input, + ch_spikes + ) +} + +// Try with spikes as control genes, but stripping rather than using + +workflow test_deseq2_differential_strip_spikes { + + expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) + expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) + expression_contrasts = file(params.test_data['mus_musculus']['genome']['rnaseq_contrasts'], checkIfExists: true) + + Channel.fromPath(expression_contrasts) + .splitCsv ( header:true, sep:',' ) + .map{ + tuple(it, expression_sample_sheet, expression_matrix_file) + } + .set{ + input + } + + // Make our fake spikes and pretend they're ERCC controls spoof_spikes(expression_matrix_file) .map{ diff --git a/tests/modules/nf-core/deseq2/differential/nextflow.config b/tests/modules/nf-core/deseq2/differential/nextflow.config index dae3c74e82c..3c6cabd6792 100644 --- a/tests/modules/nf-core/deseq2/differential/nextflow.config +++ b/tests/modules/nf-core/deseq2/differential/nextflow.config @@ -8,6 +8,9 @@ process { withName: 'test_deseq2_differential_spikes:DESEQ2_DIFFERENTIAL' { ext.args = { "--sizefactors_from_controls TRUE --contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } } + withName: 'test_deseq2_differential_strip_spikes:DESEQ2_DIFFERENTIAL' { + ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } + } withName: 'test_deseq2_differential_csv:DESEQ2_DIFFERENTIAL' { ext.args = { "--contrast_variable $meta.variable --reference_level $meta.reference --treatment_level $meta.target --blocking_variables $meta.blocking --vs_method rlog" } } diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index b9dbe681aa1..253f7d8aa5b 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -1,8 +1,8 @@ - name: deseq2 differential test_deseq2_differential command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 86f0312a4691dfb4d7c15643059d8fb8 @@ -24,8 +24,8 @@ - name: deseq2 differential test_deseq2_differential_spikes command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 150a32eef482244b47ddc7f7ffb1ad2a @@ -46,11 +46,36 @@ - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc +- name: deseq2 differential test_deseq2_differential_strip_spikes + command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_strip_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config + tags: + - deseq2 + - deseq2/differential + files: + - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv + md5sum: 23de450bda331e7b9330dfd66042a309 + - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv + md5sum: a526a1bb5cb270f5a4a1641fefd289b3 + - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv + md5sum: bb916c41f91b2ddcc9607619a023ef44 + - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv + md5sum: 1660bd7529a2f607cd8e71820ea26310 + - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv + md5sum: 7a385151de48430e592dbcc72c0d0d75 + - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv + md5sum: a526a1bb5cb270f5a4a1641fefd289b3 + - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv + md5sum: bb916c41f91b2ddcc9607619a023ef44 + - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv + md5sum: 1660bd7529a2f607cd8e71820ea26310 + - path: output/spoof/spikes.txt + md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc + - name: deseq2 differential test_deseq2_differential_csv command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_csv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 86f0312a4691dfb4d7c15643059d8fb8 @@ -74,8 +99,8 @@ - name: deseq2 differential test_deseq2_differential_vst_nsub command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_vst_nsub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv md5sum: 86f0312a4691dfb4d7c15643059d8fb8 From 59bac88753d6aff781a2aed76a6737395f65709a Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 18:34:05 +0000 Subject: [PATCH 06/12] Reduce precision again for CI --- .../deseq2/differential/templates/deseq_de.R | 4 +- .../nf-core/deseq2/differential/test.yml | 50 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 0aa0979e752..8377e1747aa 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -60,12 +60,12 @@ read_delim_flexible <- function(file, header = TRUE, row.names = NULL){ #' #' @return output Data frame -round_dataframe_columns <- function(df, columns = NULL, digits = 8){ +round_dataframe_columns <- function(df, columns = NULL, digits = 7){ if (is.null(columns)){ columns <- colnames(df) } - df[,columns] <- format(data.frame(df[, columns]), nsmall = 8) + df[,columns] <- format(data.frame(df[, columns]), nsmall = digits) # Convert columns back to numeric diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index 253f7d8aa5b..2ca0416c469 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -1,120 +1,120 @@ - name: deseq2 differential test_deseq2_differential command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 86f0312a4691dfb4d7c15643059d8fb8 + md5sum: a00c45695c7ded0a3fe283badb0ff6aa - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 1077cf03a8c6a155932eaaed7415b74c + md5sum: 835dd0c35bb59504348c534d83220962 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 4034522732d975951c79731acc1c9731 + md5sum: d9f88e278ff0e075f4f9171c02d84c13 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 1077cf03a8c6a155932eaaed7415b74c + md5sum: 835dd0c35bb59504348c534d83220962 - name: deseq2 differential test_deseq2_differential_spikes command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 150a32eef482244b47ddc7f7ffb1ad2a + md5sum: f8afccfcc81c187d46a648cc1fbac668 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: c28300837df9ca6adeba2a52ea5e181e + md5sum: 68a4068331d67a9767aafe3f6fa40360 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 88b3230c5a4ad8717c1d0b38c824f1fc + md5sum: b18a7320ae857283c82ea6ff859302d0 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: c28300837df9ca6adeba2a52ea5e181e + md5sum: 68a4068331d67a9767aafe3f6fa40360 - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc - name: deseq2 differential test_deseq2_differential_strip_spikes command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_strip_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 23de450bda331e7b9330dfd66042a309 + md5sum: ac6fa7f3dcd4fa3cfa20c0ed2a618f30 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: bb916c41f91b2ddcc9607619a023ef44 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 1660bd7529a2f607cd8e71820ea26310 + md5sum: 8b2be7f2ec5000cc4d3f795a41d40e77 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 7a385151de48430e592dbcc72c0d0d75 + md5sum: 8dcdcedd79b27eb490bf43f3d7b74151 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: bb916c41f91b2ddcc9607619a023ef44 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 1660bd7529a2f607cd8e71820ea26310 + md5sum: 8b2be7f2ec5000cc4d3f795a41d40e77 - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc - name: deseq2 differential test_deseq2_differential_csv command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_csv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 86f0312a4691dfb4d7c15643059d8fb8 + md5sum: a00c45695c7ded0a3fe283badb0ff6aa - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 1077cf03a8c6a155932eaaed7415b74c + md5sum: 835dd0c35bb59504348c534d83220962 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 4034522732d975951c79731acc1c9731 + md5sum: d9f88e278ff0e075f4f9171c02d84c13 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 1077cf03a8c6a155932eaaed7415b74c + md5sum: 835dd0c35bb59504348c534d83220962 - path: output/tsv/test.csv md5sum: f8e51c79c9add0d07eb46aba6a09d33c - name: deseq2 differential test_deseq2_differential_vst_nsub command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_vst_nsub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2 - deseq2/differential + - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 86f0312a4691dfb4d7c15643059d8fb8 + md5sum: a00c45695c7ded0a3fe283badb0ff6aa - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.vst.tsv - md5sum: 0960df48c0116a626289960284148fbb + md5sum: a1e398efc1aa7c468a56fc34e0482bf3 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 4034522732d975951c79731acc1c9731 + md5sum: d9f88e278ff0e075f4f9171c02d84c13 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.vst.tsv - md5sum: 0960df48c0116a626289960284148fbb + md5sum: a1e398efc1aa7c468a56fc34e0482bf3 From 9362ef671cea37f48f010a2d55abbc821f8b3a53 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 19:51:16 +0000 Subject: [PATCH 07/12] one more try to see if reduced precision fixes CI --- .../deseq2/differential/templates/deseq_de.R | 2 +- .../nf-core/deseq2/differential/test.yml | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 8377e1747aa..47fdb1325c6 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -60,7 +60,7 @@ read_delim_flexible <- function(file, header = TRUE, row.names = NULL){ #' #' @return output Data frame -round_dataframe_columns <- function(df, columns = NULL, digits = 7){ +round_dataframe_columns <- function(df, columns = NULL, digits = 6){ if (is.null(columns)){ columns <- colnames(df) } diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index 2ca0416c469..30d4f07ad87 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -5,7 +5,7 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a00c45695c7ded0a3fe283badb0ff6aa + md5sum: 279b4b8068bf6120adea9af9e016854a - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv @@ -13,7 +13,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv md5sum: 835dd0c35bb59504348c534d83220962 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: d9f88e278ff0e075f4f9171c02d84c13 + md5sum: 0e3118a5818d4b72d5b5f6bd5d00117e - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv @@ -28,21 +28,21 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: f8afccfcc81c187d46a648cc1fbac668 + md5sum: a111728c24aa705d68fd10c82dbb2a3e - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 68a4068331d67a9767aafe3f6fa40360 + md5sum: 598e74a8e93f06ac7ada9018c3608e00 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: b18a7320ae857283c82ea6ff859302d0 + md5sum: 51ca7684a74710474abd2569000ceb15 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 68a4068331d67a9767aafe3f6fa40360 + md5sum: 598e74a8e93f06ac7ada9018c3608e00 - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc @@ -53,7 +53,7 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: ac6fa7f3dcd4fa3cfa20c0ed2a618f30 + md5sum: 6d2b0528dcd3f584d24b52db7219bacf - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv @@ -61,7 +61,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv md5sum: 8b2be7f2ec5000cc4d3f795a41d40e77 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 8dcdcedd79b27eb490bf43f3d7b74151 + md5sum: ebad62219b96eb48123ad625a86fc604 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv @@ -78,7 +78,7 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a00c45695c7ded0a3fe283badb0ff6aa + md5sum: 279b4b8068bf6120adea9af9e016854a - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv @@ -86,7 +86,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv md5sum: 835dd0c35bb59504348c534d83220962 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: d9f88e278ff0e075f4f9171c02d84c13 + md5sum: 0e3118a5818d4b72d5b5f6bd5d00117e - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv @@ -103,18 +103,18 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a00c45695c7ded0a3fe283badb0ff6aa + md5sum: 279b4b8068bf6120adea9af9e016854a - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.vst.tsv - md5sum: a1e398efc1aa7c468a56fc34e0482bf3 + md5sum: 86146eea79b145810755548706bbc52c - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: d9f88e278ff0e075f4f9171c02d84c13 + md5sum: 0e3118a5818d4b72d5b5f6bd5d00117e - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.vst.tsv - md5sum: a1e398efc1aa7c468a56fc34e0482bf3 + md5sum: 86146eea79b145810755548706bbc52c From 150bb920df253e3ed067a06e6637996bdc94fa80 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 20:01:19 +0000 Subject: [PATCH 08/12] Revert "one more try to see if reduced precision fixes CI" This reverts commit 9362ef671cea37f48f010a2d55abbc821f8b3a53. --- .../deseq2/differential/templates/deseq_de.R | 2 +- .../nf-core/deseq2/differential/test.yml | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 47fdb1325c6..8377e1747aa 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -60,7 +60,7 @@ read_delim_flexible <- function(file, header = TRUE, row.names = NULL){ #' #' @return output Data frame -round_dataframe_columns <- function(df, columns = NULL, digits = 6){ +round_dataframe_columns <- function(df, columns = NULL, digits = 7){ if (is.null(columns)){ columns <- colnames(df) } diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index 30d4f07ad87..2ca0416c469 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -5,7 +5,7 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 279b4b8068bf6120adea9af9e016854a + md5sum: a00c45695c7ded0a3fe283badb0ff6aa - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv @@ -13,7 +13,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv md5sum: 835dd0c35bb59504348c534d83220962 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 0e3118a5818d4b72d5b5f6bd5d00117e + md5sum: d9f88e278ff0e075f4f9171c02d84c13 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv @@ -28,21 +28,21 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a111728c24aa705d68fd10c82dbb2a3e + md5sum: f8afccfcc81c187d46a648cc1fbac668 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 598e74a8e93f06ac7ada9018c3608e00 + md5sum: 68a4068331d67a9767aafe3f6fa40360 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 51ca7684a74710474abd2569000ceb15 + md5sum: b18a7320ae857283c82ea6ff859302d0 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 598e74a8e93f06ac7ada9018c3608e00 + md5sum: 68a4068331d67a9767aafe3f6fa40360 - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc @@ -53,7 +53,7 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 6d2b0528dcd3f584d24b52db7219bacf + md5sum: ac6fa7f3dcd4fa3cfa20c0ed2a618f30 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv @@ -61,7 +61,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv md5sum: 8b2be7f2ec5000cc4d3f795a41d40e77 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: ebad62219b96eb48123ad625a86fc604 + md5sum: 8dcdcedd79b27eb490bf43f3d7b74151 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv @@ -78,7 +78,7 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 279b4b8068bf6120adea9af9e016854a + md5sum: a00c45695c7ded0a3fe283badb0ff6aa - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv @@ -86,7 +86,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv md5sum: 835dd0c35bb59504348c534d83220962 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 0e3118a5818d4b72d5b5f6bd5d00117e + md5sum: d9f88e278ff0e075f4f9171c02d84c13 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv @@ -103,18 +103,18 @@ - deseq2 files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: 279b4b8068bf6120adea9af9e016854a + md5sum: a00c45695c7ded0a3fe283badb0ff6aa - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.vst.tsv - md5sum: 86146eea79b145810755548706bbc52c + md5sum: a1e398efc1aa7c468a56fc34e0482bf3 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 0e3118a5818d4b72d5b5f6bd5d00117e + md5sum: d9f88e278ff0e075f4f9171c02d84c13 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.vst.tsv - md5sum: 86146eea79b145810755548706bbc52c + md5sum: a1e398efc1aa7c468a56fc34e0482bf3 From f1b1765cabe8e43b9ff7d85f29ffabcb9b2d354c Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 20:01:46 +0000 Subject: [PATCH 09/12] Revert "Reduce precision again for CI" This reverts commit 59bac88753d6aff781a2aed76a6737395f65709a. --- .../deseq2/differential/templates/deseq_de.R | 4 +- .../nf-core/deseq2/differential/test.yml | 50 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 8377e1747aa..0aa0979e752 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -60,12 +60,12 @@ read_delim_flexible <- function(file, header = TRUE, row.names = NULL){ #' #' @return output Data frame -round_dataframe_columns <- function(df, columns = NULL, digits = 7){ +round_dataframe_columns <- function(df, columns = NULL, digits = 8){ if (is.null(columns)){ columns <- colnames(df) } - df[,columns] <- format(data.frame(df[, columns]), nsmall = digits) + df[,columns] <- format(data.frame(df[, columns]), nsmall = 8) # Convert columns back to numeric diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index 2ca0416c469..253f7d8aa5b 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -1,120 +1,120 @@ - name: deseq2 differential test_deseq2_differential command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a00c45695c7ded0a3fe283badb0ff6aa + md5sum: 86f0312a4691dfb4d7c15643059d8fb8 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 835dd0c35bb59504348c534d83220962 + md5sum: 1077cf03a8c6a155932eaaed7415b74c - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: d9f88e278ff0e075f4f9171c02d84c13 + md5sum: 4034522732d975951c79731acc1c9731 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 835dd0c35bb59504348c534d83220962 + md5sum: 1077cf03a8c6a155932eaaed7415b74c - name: deseq2 differential test_deseq2_differential_spikes command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: f8afccfcc81c187d46a648cc1fbac668 + md5sum: 150a32eef482244b47ddc7f7ffb1ad2a - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 68a4068331d67a9767aafe3f6fa40360 + md5sum: c28300837df9ca6adeba2a52ea5e181e - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: b18a7320ae857283c82ea6ff859302d0 + md5sum: 88b3230c5a4ad8717c1d0b38c824f1fc - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 1708374146b4e8c28fbc78fa292102cd - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 1c9c7ee4ca90ff0d91ae16dbfd64fdc9 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 68a4068331d67a9767aafe3f6fa40360 + md5sum: c28300837df9ca6adeba2a52ea5e181e - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc - name: deseq2 differential test_deseq2_differential_strip_spikes command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_strip_spikes -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: ac6fa7f3dcd4fa3cfa20c0ed2a618f30 + md5sum: 23de450bda331e7b9330dfd66042a309 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: bb916c41f91b2ddcc9607619a023ef44 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 8b2be7f2ec5000cc4d3f795a41d40e77 + md5sum: 1660bd7529a2f607cd8e71820ea26310 - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: 8dcdcedd79b27eb490bf43f3d7b74151 + md5sum: 7a385151de48430e592dbcc72c0d0d75 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: a526a1bb5cb270f5a4a1641fefd289b3 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: bb916c41f91b2ddcc9607619a023ef44 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 8b2be7f2ec5000cc4d3f795a41d40e77 + md5sum: 1660bd7529a2f607cd8e71820ea26310 - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc - name: deseq2 differential test_deseq2_differential_csv command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_csv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a00c45695c7ded0a3fe283badb0ff6aa + md5sum: 86f0312a4691dfb4d7c15643059d8fb8 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 835dd0c35bb59504348c534d83220962 + md5sum: 1077cf03a8c6a155932eaaed7415b74c - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: d9f88e278ff0e075f4f9171c02d84c13 + md5sum: 4034522732d975951c79731acc1c9731 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 835dd0c35bb59504348c534d83220962 + md5sum: 1077cf03a8c6a155932eaaed7415b74c - path: output/tsv/test.csv md5sum: f8e51c79c9add0d07eb46aba6a09d33c - name: deseq2 differential test_deseq2_differential_vst_nsub command: nextflow run ./tests/modules/nf-core/deseq2/differential -entry test_deseq2_differential_vst_nsub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deseq2/differential/nextflow.config tags: - - deseq2/differential - deseq2 + - deseq2/differential files: - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.results.tsv - md5sum: a00c45695c7ded0a3fe283badb0ff6aa + md5sum: 86f0312a4691dfb4d7c15643059d8fb8 - path: output/deseq2/treatment-mCherry-hND6-sample_number.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6-sample_number.vst.tsv - md5sum: a1e398efc1aa7c468a56fc34e0482bf3 + md5sum: 0960df48c0116a626289960284148fbb - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv - md5sum: d9f88e278ff0e075f4f9171c02d84c13 + md5sum: 4034522732d975951c79731acc1c9731 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv md5sum: 6332f21889ecac387bb12eeb04f23849 - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: 827cdf01f366d72d6e4b500e9862ba74 - path: output/deseq2/treatment-mCherry-hND6.vst.tsv - md5sum: a1e398efc1aa7c468a56fc34e0482bf3 + md5sum: 0960df48c0116a626289960284148fbb From 3877c9490a95629057e634f656d576a26a6722b8 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 20:02:47 +0000 Subject: [PATCH 10/12] fix digits specification --- modules/nf-core/deseq2/differential/templates/deseq_de.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq_de.R index 0aa0979e752..4b4cc1af23a 100755 --- a/modules/nf-core/deseq2/differential/templates/deseq_de.R +++ b/modules/nf-core/deseq2/differential/templates/deseq_de.R @@ -65,7 +65,7 @@ round_dataframe_columns <- function(df, columns = NULL, digits = 8){ columns <- colnames(df) } - df[,columns] <- format(data.frame(df[, columns]), nsmall = 8) + df[,columns] <- format(data.frame(df[, columns]), nsmall = digits) # Convert columns back to numeric From 9dd0f69792db4dacd225ce37171adf0332ae531b Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 20:30:18 +0000 Subject: [PATCH 11/12] replace md5sum with contains for failing test --- tests/modules/nf-core/deseq2/differential/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/nf-core/deseq2/differential/test.yml b/tests/modules/nf-core/deseq2/differential/test.yml index 253f7d8aa5b..8435dbe93bd 100644 --- a/tests/modules/nf-core/deseq2/differential/test.yml +++ b/tests/modules/nf-core/deseq2/differential/test.yml @@ -59,7 +59,7 @@ - path: output/deseq2/treatment-mCherry-hND6-sample_number.normalised_counts.tsv md5sum: bb916c41f91b2ddcc9607619a023ef44 - path: output/deseq2/treatment-mCherry-hND6-sample_number.rlog.tsv - md5sum: 1660bd7529a2f607cd8e71820ea26310 + contains: ["ENSMUSG00000036480\t4.01671566\t4.29840714\t5.04221558\t3.09476385\t3.56634694\t5.04719582"] - path: output/deseq2/treatment-mCherry-hND6.deseq2.results.tsv md5sum: 7a385151de48430e592dbcc72c0d0d75 - path: output/deseq2/treatment-mCherry-hND6.deseq2.sizefactors.tsv @@ -67,7 +67,7 @@ - path: output/deseq2/treatment-mCherry-hND6.normalised_counts.tsv md5sum: bb916c41f91b2ddcc9607619a023ef44 - path: output/deseq2/treatment-mCherry-hND6.rlog.tsv - md5sum: 1660bd7529a2f607cd8e71820ea26310 + contains: ["ENSMUSG00000036480\t4.01671566\t4.29840714\t5.04221558\t3.09476385\t3.56634694\t5.04719582"] - path: output/spoof/spikes.txt md5sum: 8bd8a80b4616fc0a68f69bee6869c8bc From 4a59c493e0f6d6af94fda9fd91ce3ea9c2f527d6 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 21 Nov 2022 20:48:51 +0000 Subject: [PATCH 12/12] Add info on using control genes to meta.yaml --- modules/nf-core/deseq2/differential/meta.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/nf-core/deseq2/differential/meta.yml b/modules/nf-core/deseq2/differential/meta.yml index 200cacf35ee..899ee71a6d6 100644 --- a/modules/nf-core/deseq2/differential/meta.yml +++ b/modules/nf-core/deseq2/differential/meta.yml @@ -39,6 +39,13 @@ input: type: file description: | Meta map describing control genes, e.g. [ id: 'ERCC' ] + - sizefactors_from_controls: + type: boolean + description: | + Specify if any supplied control genes should just be stripped to + prevent bias in conventional normalisation (default), or used to + generate the size factors (supplied via task.ext.args like + '--sizefactors_from_controls TRUE'). output: - results: