diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efcd0e8..a79ad9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,3 +42,7 @@ jobs: - name: Run pipeline with test data and gene scores run: | nextflow run ${GITHUB_WORKSPACE} -profile test_scores,docker --outdir ./results + + - name: Run pipeline with test data and duplicate sample ids + run: | + nextflow run ${GITHUB_WORKSPACE} -profile test_samples,docker --outdir ./results diff --git a/CHANGELOG.md b/CHANGELOG.md index 17d082c..29138d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v1.1.1 - 2023-06-23 + +### `Added` + +- [#37](https://github.com/nf-core/nanostring/pull/37) - Allow skipping heatmap creation [#38](https://github.com/nf-core/nanostring/issues/38) + +### `Fixed` + +- [#37](https://github.com/nf-core/nanostring/pull/37) - Use unique rownames for Heatmap creation + +### `Dependencies` + +### `Deprecated` + ## v1.1.0 - 2023-06-22 - Picometre ### `Added` diff --git a/bin/compute_gene_heatmap.R b/bin/compute_gene_heatmap.R index 29301a5..a269d28 100755 --- a/bin/compute_gene_heatmap.R +++ b/bin/compute_gene_heatmap.R @@ -31,7 +31,7 @@ if (length(args) == 2) { counts_selected <- counts %>% dplyr::select(all_of(genes)) #Add proper Rownames -rownames(counts_selected) <- counts$SAMPLE_ID +rownames(counts_selected) <- counts$RCC_FILE_NAME #sort dataframe by rownames to make it easier comparable across heatmaps counts_selected[order(row.names(counts_selected)), ] diff --git a/conf/test_samples.config b/conf/test_samples.config new file mode 100644 index 0000000..d5f5403 --- /dev/null +++ b/conf/test_samples.config @@ -0,0 +1,25 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running tests for the same sample with multiple files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/nanostring -profile test_samples, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'Test profile with duplicate sample' + config_profile_description = 'Test dataset to check pipeline function when we have a duplicate sample id' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + + // Input data + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanostring/samplesheets/samplesheet_test_sampleid.csv' + +} diff --git a/nextflow.config b/nextflow.config index d21e271..394fbc1 100644 --- a/nextflow.config +++ b/nextflow.config @@ -12,9 +12,13 @@ params { // Input options input = null + //Skipping options + skip_heatmap = false + // Pipeline options heatmap_genes_to_filter = null + // References genome = null igenomes_base = 's3://ngi-igenomes/igenomes' @@ -167,9 +171,10 @@ profiles { executor.cpus = 16 executor.memory = 60.GB } - test { includeConfig 'conf/test.config' } - test_full { includeConfig 'conf/test_full.config' } - test_scores { includeConfig 'conf/test_scores.config' } + test { includeConfig 'conf/test.config' } + test_full { includeConfig 'conf/test_full.config' } + test_scores { includeConfig 'conf/test_scores.config' } + test_samples { includeConfig 'conf/test_samples.config' } } @@ -220,7 +225,7 @@ manifest { description = """A Nanostring nCounter analysis pipeline""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '1.1.0' + version = '1.1.1' doi = '' } diff --git a/nextflow_schema.json b/nextflow_schema.json index 2526266..54a7f4e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -76,6 +76,18 @@ } } }, + "skipping_options": { + "title": "Skipping Options", + "type": "object", + "description": "Allows to specify options to skip parts of the pipeline", + "default": "", + "properties": { + "skip_heatmap": { + "type": "boolean", + "description": "Skip creating the heatmap" + } + } + }, "reference_genome_options": { "title": "Reference genome options", "type": "object", @@ -296,6 +308,9 @@ { "$ref": "#/definitions/gene_score_computation" }, + { + "$ref": "#/definitions/skipping_options" + }, { "$ref": "#/definitions/reference_genome_options" }, diff --git a/workflows/nanostring.nf b/workflows/nanostring.nf index 55a070a..1928fb4 100644 --- a/workflows/nanostring.nf +++ b/workflows/nanostring.nf @@ -128,10 +128,13 @@ workflow NANOSTRING { // // MODULE: Compute gene-count heatmap for MultiQC report based on annotated (ENDO) counts // - CREATE_GENE_HEATMAP ( + if(!params.skip_heatmap){ + CREATE_GENE_HEATMAP ( CREATE_ANNOTATED_TABLES.out.annotated_endo_data - ) - ch_versions = ch_versions.mix(CREATE_GENE_HEATMAP.out.versions) + ) + ch_versions = ch_versions.mix(CREATE_GENE_HEATMAP.out.versions) + } + // // DUMP SOFTWARE VERSIONS