diff --git a/CHANGELOG.md b/CHANGELOG.md index 2325f46c..85cd025b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- [[#280](https://github.com/nf-core/differentialabundance/pull/280)] - Bump shinyngs, fix contrasts passed to app creation ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO)) +- [[#274](https://github.com/nf-core/differentialabundance/pull/274)] - Fix pagination on samples table ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO)) - [[#272](https://github.com/nf-core/differentialabundance/pull/272)] - Show >10 contrasts in report ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO)) +- [[#282](https://github.com/nf-core/differentialabundance/pull/282)] - In order to improve resumability, create a copy of the matrix as an annotation file only if necessary; add original matrix file name to copy name ([@bjlang](https://github.com/bjlang), review by [@WackerO](https://github.com/WackerO)) ### Changed @@ -32,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [[#278](https://github.com/nf-core/differentialabundance/pull/278)] - Fix missing ch_gene_sets when running gprofiler without gene sets ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#267](https://github.com/nf-core/differentialabundance/pull/267)] - Whitespace fix, remove TODO, also update changelog for release release 1.5.0 ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#265](https://github.com/nf-core/differentialabundance/pull/265)] - GSEA- pngs and htmls in same place ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO)) - [[#257](https://github.com/nf-core/differentialabundance/pull/257)] - Fixed FILTER_DIFFTABLE module, updated PROTEUS module to better handle whitespace in prefix param, made docs clearer ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) diff --git a/assets/differentialabundance_report.Rmd b/assets/differentialabundance_report.Rmd index 861f55e0..b13d321c 100644 --- a/assets/differentialabundance_report.Rmd +++ b/assets/differentialabundance_report.Rmd @@ -487,7 +487,7 @@ display_columns <- head(union(display_columns, additional_useful_cols), 5) display_columns <- unique(c(display_columns, informative_variables)) observations_to_print <- observations[,unique(display_columns)] colnames(observations_to_print) <- prettifyVariablename(colnames(observations_to_print)) -print( htmltools::tagList(datatable(observations_to_print, caption = paste(ucfirst(params$observations_type), 'metadata'), rownames = FALSE, options = list(dom = 'tb')) )) +print( htmltools::tagList(datatable(observations_to_print, caption = paste(ucfirst(params$observations_type), 'metadata'), rownames = FALSE, options = list(dom = 'tp')) )) ``` ## Contrasts diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 0dcde718..a6dff49c 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,8 +1,8 @@ report_comment: > - This report has been generated by the nf-core/differentialabundance + This report has been generated by the nf-core/differentialabundance analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-differentialabundance-methods-description": diff --git a/conf/modules.config b/conf/modules.config index 453bd733..5d987f51 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -420,7 +420,7 @@ process { ((params.report_title == null) ? '' : "--title \"$params.report_title\""), ((params.report_author == null) ? '' : "--author \"$params.report_author\""), ((params.report_description == null) ? '' : "--description \"$params.report_description\""), - ((params.shinyngs_guess_unlog_matrices) ? "--guess_unlog_matrices" : ''), + ( (params.study_type == 'maxquant') ? "--log2_assays ''" : (((params.exploratory_log2_assays == null) ? '' : "--log2_assays \"$params.exploratory_log2_assays\"".replace('[', '').replace(']', ''))) ), ((params.shinyngs_deploy_to_shinyapps_io) ? "--deploy_app" : ''), ((params.shinyngs_shinyapps_account == null) ? '' : "--shinyapps_account \"$params.shinyngs_shinyapps_account\""), ((params.shinyngs_shinyapps_app_name == null) ? '' : "--shinyapps_name \"$params.shinyngs_shinyapps_app_name\"") diff --git a/modules.json b/modules.json index c4aa0ba5..e2481610 100644 --- a/modules.json +++ b/modules.json @@ -92,22 +92,22 @@ }, "shinyngs/app": { "branch": "master", - "git_sha": "85519fe9deccf2c5f7ff1f3b5d3494c61a794643", + "git_sha": "91fc36585a50f9bae98cb5b3dff36ce64c83a6b4", "installed_by": ["modules"] }, "shinyngs/staticdifferential": { "branch": "master", - "git_sha": "85519fe9deccf2c5f7ff1f3b5d3494c61a794643", + "git_sha": "91fc36585a50f9bae98cb5b3dff36ce64c83a6b4", "installed_by": ["modules"] }, "shinyngs/staticexploratory": { "branch": "master", - "git_sha": "85519fe9deccf2c5f7ff1f3b5d3494c61a794643", + "git_sha": "91fc36585a50f9bae98cb5b3dff36ce64c83a6b4", "installed_by": ["modules"] }, "shinyngs/validatefomcomponents": { "branch": "master", - "git_sha": "85519fe9deccf2c5f7ff1f3b5d3494c61a794643", + "git_sha": "91fc36585a50f9bae98cb5b3dff36ce64c83a6b4", "installed_by": ["modules"] }, "untar": { diff --git a/modules/nf-core/shinyngs/app/environment.yml b/modules/nf-core/shinyngs/app/environment.yml index 0e6de401..43a09fff 100644 --- a/modules/nf-core/shinyngs/app/environment.yml +++ b/modules/nf-core/shinyngs/app/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.8 + - bioconda::r-shinyngs=2.0.0 diff --git a/modules/nf-core/shinyngs/app/main.nf b/modules/nf-core/shinyngs/app/main.nf index ef05a863..39b2db46 100644 --- a/modules/nf-core/shinyngs/app/main.nf +++ b/modules/nf-core/shinyngs/app/main.nf @@ -15,8 +15,8 @@ process SHINYNGS_APP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.8--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.8--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:2.0.0--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:2.0.0--r43hdfd78af_0' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) // Experiment-level info diff --git a/modules/nf-core/shinyngs/app/tests/main.nf.test.snap b/modules/nf-core/shinyngs/app/tests/main.nf.test.snap index f87c17d7..434d540c 100644 --- a/modules/nf-core/shinyngs/app/tests/main.nf.test.snap +++ b/modules/nf-core/shinyngs/app/tests/main.nf.test.snap @@ -4,41 +4,41 @@ "data.rds", "app.R:md5,d41d8cd98f00b204e9800998ecf8427e", [ - "versions.yml:md5,9a3135ae8ff362a9671b280dcc5781da" + "versions.yml:md5,a6c3af4b2fd261b4049c92449ea6bb4d" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:47:11.758494" + "timestamp": "2024-06-25T09:43:49.880332" }, "mouse - multi matrix": { "content": [ "data.rds", "app.R:md5,bedcfc45b6cdcc2b8fe3627987e2b17a", [ - "versions.yml:md5,9a3135ae8ff362a9671b280dcc5781da" + "versions.yml:md5,a6c3af4b2fd261b4049c92449ea6bb4d" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:46:37.144273" + "timestamp": "2024-06-25T09:43:15.455356" }, "mouse - single matrix": { "content": [ "data.rds", "app.R:md5,bedcfc45b6cdcc2b8fe3627987e2b17a", [ - "versions.yml:md5,9a3135ae8ff362a9671b280dcc5781da" + "versions.yml:md5,a6c3af4b2fd261b4049c92449ea6bb4d" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:46:57.227288" + "timestamp": "2024-06-25T09:43:35.309081" } } \ No newline at end of file diff --git a/modules/nf-core/shinyngs/staticdifferential/environment.yml b/modules/nf-core/shinyngs/staticdifferential/environment.yml index bec57084..f352c61e 100644 --- a/modules/nf-core/shinyngs/staticdifferential/environment.yml +++ b/modules/nf-core/shinyngs/staticdifferential/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.8 + - bioconda::r-shinyngs=2.0.0 diff --git a/modules/nf-core/shinyngs/staticdifferential/main.nf b/modules/nf-core/shinyngs/staticdifferential/main.nf index c61ccb4a..40582d66 100644 --- a/modules/nf-core/shinyngs/staticdifferential/main.nf +++ b/modules/nf-core/shinyngs/staticdifferential/main.nf @@ -4,8 +4,8 @@ process SHINYNGS_STATICDIFFERENTIAL { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.8--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.8--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:2.0.0--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:2.0.0--r43hdfd78af_0' }" input: tuple val(meta), path(differential_result) // Differential info: contrast and differential stats diff --git a/modules/nf-core/shinyngs/staticexploratory/environment.yml b/modules/nf-core/shinyngs/staticexploratory/environment.yml index 1c923f1b..74f9d52f 100644 --- a/modules/nf-core/shinyngs/staticexploratory/environment.yml +++ b/modules/nf-core/shinyngs/staticexploratory/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.8 + - bioconda::r-shinyngs=2.0.0 diff --git a/modules/nf-core/shinyngs/staticexploratory/main.nf b/modules/nf-core/shinyngs/staticexploratory/main.nf index 1a3104b3..379a2b11 100644 --- a/modules/nf-core/shinyngs/staticexploratory/main.nf +++ b/modules/nf-core/shinyngs/staticexploratory/main.nf @@ -4,8 +4,8 @@ process SHINYNGS_STATICEXPLORATORY { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.8--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.8--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:2.0.0--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:2.0.0--r43hdfd78af_0' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) diff --git a/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap b/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap index b95d031c..289428ef 100644 --- a/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap +++ b/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap @@ -8,14 +8,14 @@ "pca3d.png", "sample_dendrogram.png", [ - "versions.yml:md5,526fbe61b95ad3a722d7470ca1874ca3" + "versions.yml:md5,e04025d7790ddfa09ba5bd719cfba8c7" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:48:20.908769" + "timestamp": "2024-06-25T10:24:53.456056" }, "mouse - defaults": { "content": [ @@ -26,14 +26,14 @@ "pca3d.png", "sample_dendrogram.png", [ - "versions.yml:md5,526fbe61b95ad3a722d7470ca1874ca3" + "versions.yml:md5,e04025d7790ddfa09ba5bd719cfba8c7" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:48:06.589763" + "timestamp": "2024-06-25T10:24:39.111271" }, "mouse - specify log": { "content": [ @@ -44,14 +44,14 @@ "pca3d.png", "sample_dendrogram.png", [ - "versions.yml:md5,526fbe61b95ad3a722d7470ca1874ca3" + "versions.yml:md5,e04025d7790ddfa09ba5bd719cfba8c7" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:48:41.352789" + "timestamp": "2024-06-25T10:25:14.646472" }, "mouse - html": { "content": [ @@ -67,13 +67,13 @@ false, false, [ - "versions.yml:md5,526fbe61b95ad3a722d7470ca1874ca3" + "versions.yml:md5,e04025d7790ddfa09ba5bd719cfba8c7" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-03T08:49:04.969108" + "timestamp": "2024-06-25T10:25:38.256352" } } \ No newline at end of file diff --git a/modules/nf-core/shinyngs/validatefomcomponents/environment.yml b/modules/nf-core/shinyngs/validatefomcomponents/environment.yml index 4f3067bc..07485298 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/environment.yml +++ b/modules/nf-core/shinyngs/validatefomcomponents/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.8 + - bioconda::r-shinyngs=2.0.0 diff --git a/modules/nf-core/shinyngs/validatefomcomponents/main.nf b/modules/nf-core/shinyngs/validatefomcomponents/main.nf index fad3948a..bedab3e6 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/main.nf +++ b/modules/nf-core/shinyngs/validatefomcomponents/main.nf @@ -4,8 +4,8 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.8--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.8--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:2.0.0--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:2.0.0--r43hdfd78af_0' }" input: tuple val(meta), path(sample), path(assay_files) diff --git a/nextflow.config b/nextflow.config index 8ddd6b3e..70f46da3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -176,7 +176,6 @@ params { // ShinyNGS shinyngs_build_app = true - shinyngs_guess_unlog_matrices = true // Note: for shinyapps deployment, in addition to setting these values, // SHINYAPPS_TOKEN and SHINYAPPS_SECRET must be available to the @@ -416,7 +415,7 @@ manifest { description = 'Differential abundance analysis' mainScript = 'main.nf' nextflowVersion = '!>=23.10.0' - version = '1.5.0' + version = '1.6.0dev' doi = '10.5281/zenodo.7568000' } diff --git a/nextflow_schema.json b/nextflow_schema.json index 54fc1b19..8840ebec 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -989,12 +989,6 @@ "default": "null", "description": "The name of the app to push to in your shinyapps.io account", "fa_icon": "fas fa-file-signature" - }, - "shinyngs_guess_unlog_matrices": { - "type": "boolean", - "default": true, - "description": "Should we guess the log status of matrices and unlog for the app?", - "help_text": "In the app context, it's usually helpful if things are not in log scale, so that e.g. fold changes make some sense with respect to observed values. This flag will cause the shinyngs app-building script to make a guess based on observed values as to the log status of input matrices, and adjust the loading accordingly." } }, "fa_icon": "fab fa-app-store-ios" diff --git a/workflows/differentialabundance.nf b/workflows/differentialabundance.nf index 020c0747..ea0dd0bb 100644 --- a/workflows/differentialabundance.nf +++ b/workflows/differentialabundance.nf @@ -62,6 +62,7 @@ if (params.control_features) { ch_control_features = Channel.of([ exp_meta, file def run_gene_set_analysis = params.gsea_run || params.gprofiler2_run if (run_gene_set_analysis) { + ch_gene_sets = Channel.of([]) // For methods that can run without gene sets if (params.gene_sets_files) { gene_sets_files = params.gene_sets_files.split(",") ch_gene_sets = Channel.of(gene_sets_files).map { file(it, checkIfExists: true) } @@ -74,8 +75,6 @@ if (run_gene_set_analysis) { if (!params.gprofiler2_token && !params.gprofiler2_organism) { error("To run gprofiler2, please provide a run token, GMT file or organism!") } - } else { - ch_gene_sets = [] // For methods that can run without gene sets } } @@ -254,7 +253,7 @@ workflow DIFFERENTIALABUNDANCE { // Otherwise we can just use the matrix input; save it to the workdir so that it does not // just appear wherever the user runs the pipeline - matrix_as_anno_filename = "${workflow.workDir}/matrix_as_anno.${matrix_file.getExtension()}" + matrix_as_anno_filename = "${workflow.workDir}/${matrix_file.getBaseName()}_as_anno.${matrix_file.getExtension()}" if (params.study_type == 'maxquant'){ ch_features_matrix = ch_in_norm } else { @@ -262,7 +261,8 @@ workflow DIFFERENTIALABUNDANCE { } ch_features = ch_features_matrix .map{ meta, matrix -> - matrix.copyTo(matrix_as_anno_filename) + matrix_copy = file(matrix_as_anno_filename) + matrix_copy.exists() && matrix.getText().md5().equals(matrix_copy.getText().md5()) ?: matrix.copyTo(matrix_as_anno_filename) [ meta, file(matrix_as_anno_filename) ] } } @@ -585,9 +585,9 @@ workflow DIFFERENTIALABUNDANCE { // Make a new contrasts file from the differential metas to guarantee the // same order as the differential results - ch_app_differential = ch_differential.first().map{it[0].keySet().join(',')} + ch_app_differential = ch_differential.first().map{it[0].keySet().tail().join(',')} .concat( - ch_differential.map{it[0].values().join(',')} + ch_differential.map{it[0].values().tail().join(',')} ) .collectFile(name: 'contrasts.csv', newLine: true, sort: false) .map{