diff --git a/CHANGELOG.md b/CHANGELOG.md index cb15bcd3..9e7351ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Added` +- [[#254](https://github.com/nf-core/differentialabundance/pull/254)] - Added advanced params section, added QBiC credits ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#250](https://github.com/nf-core/differentialabundance/pull/250)] - Template update for nf-core/tools v2.13.1 ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#244](https://github.com/nf-core/differentialabundance/pull/244)] - Add pipeline params for matrixfilter NA options ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#241](https://github.com/nf-core/differentialabundance/pull/241)] - Template update for nf-core/tools v2.13 ([@WackerO](https://github.com/WackerO), review by [@nvnieuwk](https://github.com/nvnieuwk)) @@ -17,7 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` -- [[#240](https://github.com/nf-core/differentialabundance/pull/240) - Publish GSEA reports ([@pinin4fjords](https://github.com/pinin4fjords), review by ) +- [[#254](https://github.com/nf-core/differentialabundance/pull/254)] - Made differential_file_suffix optional ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) +- [[#240](https://github.com/nf-core/differentialabundance/pull/240)] - Publish GSEA reports ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO)) - [[#231](https://github.com/nf-core/differentialabundance/pull/231)] - Update GSEA module to fix butterfly plot bug ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#226](https://github.com/nf-core/differentialabundance/pull/226)] - Fix DESEQ2_NORM in modules.config ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#221](https://github.com/nf-core/differentialabundance/pull/221)] - Update shinyngs modules to address density plots issue ([@pinin4fjords](https://github.com/pinin4fjords), review by [@maxulysse](https://github.com/maxulysse)) diff --git a/README.md b/README.md index 889f577c..adaee862 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ For more details about the output files and reports, please refer to the ## Credits -nf-core/differentialabundance was originally written by Jonathan Manning ([@pinin4fjords](https://github.com/pinin4fjords)) and Oskar Wacker ([@WackerO](https://github.com/WackerO)). Jonathan Manning (now at Seqera) initially worked on this workflow as an employee of Healx, an AI-powered, patient-inspired tech company, accelerating the discovery and development of treatments for rare diseases. We are grateful for their support of open science in this project. +nf-core/differentialabundance was originally written by Jonathan Manning ([@pinin4fjords](https://github.com/pinin4fjords)) and Oskar Wacker ([@WackerO](https://github.com/WackerO)). Jonathan Manning (now at Seqera) initially worked on this workflow as an employee of Healx, an AI-powered, patient-inspired tech company, accelerating the discovery and development of treatments for rare diseases. Oskar Wacker works for [QBiC](https://www.qbic.uni-tuebingen.de/) at Tübingen University. We are grateful for the support of open science in this project. We thank the many members of the nf-core community who assisted with this pipeline, often by reviewing module pull requests including but not limited to: diff --git a/assets/differentialabundance_report.Rmd b/assets/differentialabundance_report.Rmd index 1c509001..26fb7f4e 100644 --- a/assets/differentialabundance_report.Rmd +++ b/assets/differentialabundance_report.Rmd @@ -360,9 +360,12 @@ treatment-mCherry-hND6-batcheffect.deseq2.results.tsv --> ```{r, echo=FALSE} - +differential_file_suffix <- params$differential_file_suffix +if (is.null(differential_file_suffix)) { + differential_file_suffix <- ifelse(params$study_type %in% c('rnaseq'), ".deseq2.results.tsv", ".limma.results.tsv") +} differential_files <- lapply(contrasts$id, function(d){ - file.path(params$input_dir, paste0(gsub(' |;', '_', d), params$differential_file_suffix)) + file.path(params$input_dir, paste0(gsub(' |;', '_', d), differential_file_suffix)) }) differential_results <- lapply(differential_files, function(diff_file){ diff --git a/conf/modules.config b/conf/modules.config index 5e4a36de..5fbb5421 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -62,12 +62,11 @@ process { ] ext.prefix = { "raw." } ext.args = { [ - "--sample_name_col \"${params.observations_name_col}\"", + "--sample_name_col \"" + (params.observations_name_col == null ? params.observations_id_col : params.observations_name_col) + "\"", "--file_name_col \"${params.affy_file_name_col}\"", "--background ${params.affy_background}", "--normalize False", "--bgversion ${params.affy_bgversion}", - "--file_name_col \"${params.affy_file_name_col}\"", "--destructive ${params.affy_destructive}", "--rm.mask ${params.affy_rm_mask}", "--rm.outliers ${params.affy_rm_outliers}", @@ -86,12 +85,11 @@ process { ] ext.prefix = { "normalised." } ext.args = { [ - "--sample_name_col \"${params.observations_name_col}\"", + "--sample_name_col \"" + (params.observations_name_col == null ? params.observations_id_col : params.observations_name_col) + "\"", "--file_name_col \"${params.affy_file_name_col}\"", "--background ${params.affy_background}", "--normalize True", "--bgversion ${params.affy_bgversion}", - "--file_name_col \"${params.affy_file_name_col}\"", "--destructive ${params.affy_destructive}", "--rm.mask ${params.affy_rm_mask}", "--rm.outliers ${params.affy_rm_outliers}", @@ -423,7 +421,7 @@ process { "--assay_names \"${params.exploratory_assay_names}\"", "--sample_id_col \"${params.observations_id_col}\"", "--feature_id_col \"${params.features_id_col}\"", - "--feature_name_col \"${params.features_name_col}\"", + "--feature_name_col \"" + (params.features_name_col == null ? params.features_id_col : params.features_name_col) + "\"", "--diff_feature_id_col \"${params.differential_feature_id_column}\"", "--fold_change_column \"${params.differential_fc_column}\"", "--pval_column \"${params.differential_pval_column}\"", diff --git a/nextflow.config b/nextflow.config index 055bfa4e..c7130eae 100644 --- a/nextflow.config +++ b/nextflow.config @@ -36,7 +36,7 @@ params { // Sample sheet options observations_type = 'sample' observations_id_col = 'sample' - observations_name_col = 'sample' + observations_name_col = null // Feature options features = null @@ -89,7 +89,7 @@ params { exploratory_palette_name = 'Set1' // Differential options - differential_file_suffix = ".deseq2.results.tsv" + differential_file_suffix = null differential_feature_id_column = "gene_id" differential_feature_name_column = "gene_name" differential_fc_column = "log2FoldChange" diff --git a/nextflow_schema.json b/nextflow_schema.json index acb712b5..f9826d19 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -80,7 +80,7 @@ "type": "string", "fa_icon": "fas fa-border-all", "description": "(RNA-seq only): optional transcript length matrix with samples and genes as the abundance matrix", - "help_text": "if provided, this file willl be used to provide transcript lengths to DESeq2 to model length bias across samples" + "help_text": "If provided, this file willl be used to provide transcript lengths to DESeq2 to model length bias across samples" }, "affy_cel_files_archive": { "type": "string", @@ -119,8 +119,7 @@ }, "observations_name_col": { "type": "string", - "default": "sample", - "description": "Column in the sample sheet to be used as the display identifier for observations", + "description": "Column in the sample sheet to be used as the display identifier for observations. If unset, will use value of --observations_id_col.", "fa_icon": "fas fa-file-signature" } }, @@ -137,13 +136,13 @@ "features_id_col": { "type": "string", "default": "gene_id", - "description": "Feature ID attribute in the GTF file (e.g. the gene_id field)", + "description": "Feature ID attribute in the abundance table as well as in the GTF file (e.g. the gene_id field)", "fa_icon": "fas fa-address-card" }, "features_name_col": { "type": "string", "default": "gene_name", - "description": "Feature name attribute in the GTF file (e.g. the gene symbol field)", + "description": "Feature name attribute in the abundance table as well as in the GTF file (e.g. the gene symbol field)", "fa_icon": "fas fa-signature" }, "features_type": { @@ -393,7 +392,7 @@ "type": "string", "default": "raw,normalised,variance_stabilised", "hidden": true, - "description": "Specifies assay names to be used for matrices, platform-specific", + "description": "Specifies assay names to be used for matrices, platform-specific.", "fa_icon": "fas fa-file-signature" }, "exploratory_final_assay": { @@ -428,8 +427,7 @@ "properties": { "differential_file_suffix": { "type": "string", - "default": ".deseq2.results.tsv", - "description": "The suffix associated tabular differential results tables", + "description": "Advanced option: the suffix associated tabular differential results tables. Will by default use the appropriate suffix according to the study_type.", "fa_icon": "fas fa-signature" }, "differential_feature_id_column": { @@ -500,7 +498,6 @@ } }, "required": [ - "differential_file_suffix", "differential_feature_id_column", "differential_fc_column", "differential_qval_column", @@ -1014,6 +1011,7 @@ "report_file": { "type": "string", "description": "Rmd report template from which to create the pipeline report", + "help_text": "The pipeline will always generate a default report which gives a good overview of the analysis results. Should this default report not suit your needs, you can provide the path to a custom report instead.", "format": "file-path", "pattern": "^\\S+\\.Rmd$", "fa_icon": "fas fa-book"