From 6f3b92567947e6e1f9802017145644e891e768d0 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:28:24 +0100 Subject: [PATCH 1/3] Add psueudoaligner pipeline level tests to test suite --- .github/workflows/ci.yml | 22 -------------------- tests/tests/kallisto/main.nf.test | 28 ++++++++++++++++++++++++++ tests/tests/kallisto/main.nf.test.snap | 12 +++++++++++ tests/tests/salmon/main.nf.test | 28 ++++++++++++++++++++++++++ tests/tests/salmon/main.nf.test.snap | 12 +++++++++++ 5 files changed, 80 insertions(+), 22 deletions(-) create mode 100644 tests/tests/kallisto/main.nf.test create mode 100644 tests/tests/kallisto/main.nf.test.snap create mode 100644 tests/tests/salmon/main.nf.test create mode 100644 tests/tests/salmon/main.nf.test.snap diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a61d32c16..2bcea8bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,28 +19,6 @@ concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" cancel-in-progress: true jobs: - pseudo: - name: Test Pseudoaligners with workflow parameters - if: ${{ (github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/rnaseq')) && !contains(github.event.head_commit.message, '[ci fast]') }} - runs-on: ubuntu-latest - strategy: - matrix: - parameters: - - "--pseudo_aligner salmon --skip_qc" - - "--pseudo_aligner salmon --skip_alignment --skip_pseudo_alignment" - - "--pseudo_aligner kallisto --skip_qc" - - "--pseudo_aligner kallisto --skip_alignment --skip_pseudo_alignment" - steps: - - name: Check out pipeline code - uses: actions/checkout@v4 - - - name: Setup Nextflow - uses: nf-core/setup-nextflow@v1.5 - - - name: Run pipeline with Salmon or Kallisto and various parameters - run: | - nextflow run ${GITHUB_WORKSPACE} -profile test,docker ${{ matrix.parameters }} --outdir ./results - nf-test-changes: name: Check for changes runs-on: ubuntu-latest diff --git a/tests/tests/kallisto/main.nf.test b/tests/tests/kallisto/main.nf.test new file mode 100644 index 000000000..e36b4cb9c --- /dev/null +++ b/tests/tests/kallisto/main.nf.test @@ -0,0 +1,28 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../../../main.nf" + tag "rnaseq" + tag "PIPELINE" + + test("Default profile test") { + + when { + params { + outdir = "$outputDir" + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv' + pseudo_aligner = 'kallisto' + skip_qc = true + skip_alignment = true + } + } + + then { + assert workflow.success + + assertAll( + { assert snapshot(UTILS.removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml")).match("software_versions") } + ) + } + } +} diff --git a/tests/tests/kallisto/main.nf.test.snap b/tests/tests/kallisto/main.nf.test.snap new file mode 100644 index 000000000..299628d72 --- /dev/null +++ b/tests/tests/kallisto/main.nf.test.snap @@ -0,0 +1,12 @@ +{ + "software_versions": { + "content": [ + "{BBMAP_BBSPLIT={bbmap=39.01}, BEDTOOLS_GENOMECOV_FW={bedtools=2.31.1}, CAT_FASTQ={cat=8.3}, CUSTOM_CATADDITIONALFASTA={python=3.9.5}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, CUSTOM_TX2GENE={python=3.9.5}, DESEQ2_QC_PSEUDO={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DESEQ2_QC_STAR_SALMON={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DUPRADAR={bioconductor-dupradar=1.32.0}, FASTQC={fastqc=0.12.1}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.1}, GUNZIP_GTF={gunzip=1.1}, MULTIQC_CUSTOM_BIOTYPE={python=3.9.5}, PICARD_MARKDUPLICATES={picard=3.1.1}, QUALIMAP_RNASEQ={qualimap=2.3}, RSEQC_BAMSTAT={rseqc=5.0.2}, RSEQC_INFEREXPERIMENT={rseqc=5.0.2}, RSEQC_INNERDISTANCE={rseqc=5.0.2}, RSEQC_JUNCTIONANNOTATION={rseqc=5.0.2}, RSEQC_JUNCTIONSATURATION={rseqc=5.0.2}, RSEQC_READDISTRIBUTION={rseqc=5.0.2}, RSEQC_READDUPLICATION={rseqc=5.0.2}, SALMON_QUANT={salmon=1.10.1}, SAMTOOLS_FLAGSTAT={samtools=1.19.2}, SAMTOOLS_IDXSTATS={samtools=1.19.2}, SAMTOOLS_INDEX={samtools=1.19.2}, SAMTOOLS_SORT={samtools=1.19.2}, SAMTOOLS_STATS={samtools=1.19.2}, SE_GENE={bioconductor-summarizedexperiment=1.32.0}, STAR_ALIGN={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STAR_GENOMEGENERATE={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STRINGTIE_STRINGTIE={stringtie=2.2.1}, SUBREAD_FEATURECOUNTS={subread=2.0.1}, TRIMGALORE={trimgalore=0.6.7, cutadapt=3.4}, TXIMETA_TXIMPORT={bioconductor-tximeta=1.20.1}, UCSC_BEDCLIP={ucsc=377}, UCSC_BEDGRAPHTOBIGWIG={ucsc=445}, UNTAR_SALMON_INDEX={untar=1.3}, Workflow={nf-core/rnaseq=v3.15.0dev}}" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.01.0" + }, + "timestamp": "2024-03-04T12:40:26.161319" + } +} \ No newline at end of file diff --git a/tests/tests/salmon/main.nf.test b/tests/tests/salmon/main.nf.test new file mode 100644 index 000000000..72f8fd4e7 --- /dev/null +++ b/tests/tests/salmon/main.nf.test @@ -0,0 +1,28 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../../../main.nf" + tag "rnaseq" + tag "PIPELINE" + + test("Default profile test") { + + when { + params { + outdir = "$outputDir" + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv' + pseudo_aligner = 'salmon' + skip_qc = true + skip_alignment = true + } + } + + then { + assert workflow.success + + assertAll( + { assert snapshot(UTILS.removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml")).match("software_versions") } + ) + } + } +} diff --git a/tests/tests/salmon/main.nf.test.snap b/tests/tests/salmon/main.nf.test.snap new file mode 100644 index 000000000..299628d72 --- /dev/null +++ b/tests/tests/salmon/main.nf.test.snap @@ -0,0 +1,12 @@ +{ + "software_versions": { + "content": [ + "{BBMAP_BBSPLIT={bbmap=39.01}, BEDTOOLS_GENOMECOV_FW={bedtools=2.31.1}, CAT_FASTQ={cat=8.3}, CUSTOM_CATADDITIONALFASTA={python=3.9.5}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, CUSTOM_TX2GENE={python=3.9.5}, DESEQ2_QC_PSEUDO={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DESEQ2_QC_STAR_SALMON={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DUPRADAR={bioconductor-dupradar=1.32.0}, FASTQC={fastqc=0.12.1}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.1}, GUNZIP_GTF={gunzip=1.1}, MULTIQC_CUSTOM_BIOTYPE={python=3.9.5}, PICARD_MARKDUPLICATES={picard=3.1.1}, QUALIMAP_RNASEQ={qualimap=2.3}, RSEQC_BAMSTAT={rseqc=5.0.2}, RSEQC_INFEREXPERIMENT={rseqc=5.0.2}, RSEQC_INNERDISTANCE={rseqc=5.0.2}, RSEQC_JUNCTIONANNOTATION={rseqc=5.0.2}, RSEQC_JUNCTIONSATURATION={rseqc=5.0.2}, RSEQC_READDISTRIBUTION={rseqc=5.0.2}, RSEQC_READDUPLICATION={rseqc=5.0.2}, SALMON_QUANT={salmon=1.10.1}, SAMTOOLS_FLAGSTAT={samtools=1.19.2}, SAMTOOLS_IDXSTATS={samtools=1.19.2}, SAMTOOLS_INDEX={samtools=1.19.2}, SAMTOOLS_SORT={samtools=1.19.2}, SAMTOOLS_STATS={samtools=1.19.2}, SE_GENE={bioconductor-summarizedexperiment=1.32.0}, STAR_ALIGN={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STAR_GENOMEGENERATE={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STRINGTIE_STRINGTIE={stringtie=2.2.1}, SUBREAD_FEATURECOUNTS={subread=2.0.1}, TRIMGALORE={trimgalore=0.6.7, cutadapt=3.4}, TXIMETA_TXIMPORT={bioconductor-tximeta=1.20.1}, UCSC_BEDCLIP={ucsc=377}, UCSC_BEDGRAPHTOBIGWIG={ucsc=445}, UNTAR_SALMON_INDEX={untar=1.3}, Workflow={nf-core/rnaseq=v3.15.0dev}}" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.01.0" + }, + "timestamp": "2024-03-04T12:40:26.161319" + } +} \ No newline at end of file From eea41e7e68a750a0bcac37cd8eb37fa6eb6d98af Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:30:48 +0100 Subject: [PATCH 2/3] CI fixup --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bcea8bc5..947b1a745 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,7 @@ jobs: confirm-pass: runs-on: ubuntu-latest - needs: [test, pseudo] + needs: [test] if: always() steps: - name: All tests ok From 4299d4714062e7637d008825e9f6e1a0d65c1cba Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:32:14 +0100 Subject: [PATCH 3/3] Correct snaps for pseudoalignment --- tests/tests/kallisto/main.nf.test.snap | 6 +++--- tests/tests/salmon/main.nf.test.snap | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/tests/kallisto/main.nf.test.snap b/tests/tests/kallisto/main.nf.test.snap index 299628d72..2deb6fb8d 100644 --- a/tests/tests/kallisto/main.nf.test.snap +++ b/tests/tests/kallisto/main.nf.test.snap @@ -1,12 +1,12 @@ { "software_versions": { "content": [ - "{BBMAP_BBSPLIT={bbmap=39.01}, BEDTOOLS_GENOMECOV_FW={bedtools=2.31.1}, CAT_FASTQ={cat=8.3}, CUSTOM_CATADDITIONALFASTA={python=3.9.5}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, CUSTOM_TX2GENE={python=3.9.5}, DESEQ2_QC_PSEUDO={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DESEQ2_QC_STAR_SALMON={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DUPRADAR={bioconductor-dupradar=1.32.0}, FASTQC={fastqc=0.12.1}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.1}, GUNZIP_GTF={gunzip=1.1}, MULTIQC_CUSTOM_BIOTYPE={python=3.9.5}, PICARD_MARKDUPLICATES={picard=3.1.1}, QUALIMAP_RNASEQ={qualimap=2.3}, RSEQC_BAMSTAT={rseqc=5.0.2}, RSEQC_INFEREXPERIMENT={rseqc=5.0.2}, RSEQC_INNERDISTANCE={rseqc=5.0.2}, RSEQC_JUNCTIONANNOTATION={rseqc=5.0.2}, RSEQC_JUNCTIONSATURATION={rseqc=5.0.2}, RSEQC_READDISTRIBUTION={rseqc=5.0.2}, RSEQC_READDUPLICATION={rseqc=5.0.2}, SALMON_QUANT={salmon=1.10.1}, SAMTOOLS_FLAGSTAT={samtools=1.19.2}, SAMTOOLS_IDXSTATS={samtools=1.19.2}, SAMTOOLS_INDEX={samtools=1.19.2}, SAMTOOLS_SORT={samtools=1.19.2}, SAMTOOLS_STATS={samtools=1.19.2}, SE_GENE={bioconductor-summarizedexperiment=1.32.0}, STAR_ALIGN={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STAR_GENOMEGENERATE={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STRINGTIE_STRINGTIE={stringtie=2.2.1}, SUBREAD_FEATURECOUNTS={subread=2.0.1}, TRIMGALORE={trimgalore=0.6.7, cutadapt=3.4}, TXIMETA_TXIMPORT={bioconductor-tximeta=1.20.1}, UCSC_BEDCLIP={ucsc=377}, UCSC_BEDGRAPHTOBIGWIG={ucsc=445}, UNTAR_SALMON_INDEX={untar=1.3}, Workflow={nf-core/rnaseq=v3.15.0dev}}" + "{BBMAP_BBSPLIT={bbmap=39.01}, CAT_FASTQ={cat=8.3}, CUSTOM_CATADDITIONALFASTA={python=3.9.5}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, CUSTOM_TX2GENE={python=3.9.5}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.1}, GUNZIP_GTF={gunzip=1.1}, KALLISTO_INDEX={kallisto=0.48.0}, KALLISTO_QUANT={kallisto=0.48.0}, SALMON_QUANT={salmon=1.10.1}, SE_GENE={bioconductor-summarizedexperiment=1.32.0}, TRIMGALORE={trimgalore=0.6.7, cutadapt=3.4}, TXIMETA_TXIMPORT={bioconductor-tximeta=1.20.1}, UNTAR_SALMON_INDEX={untar=1.3}, Workflow={nf-core/rnaseq=v3.15.0dev}}" ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-04T12:40:26.161319" + "timestamp": "2024-04-10T10:13:15.867122" } } \ No newline at end of file diff --git a/tests/tests/salmon/main.nf.test.snap b/tests/tests/salmon/main.nf.test.snap index 299628d72..831b1e14b 100644 --- a/tests/tests/salmon/main.nf.test.snap +++ b/tests/tests/salmon/main.nf.test.snap @@ -1,12 +1,12 @@ { "software_versions": { "content": [ - "{BBMAP_BBSPLIT={bbmap=39.01}, BEDTOOLS_GENOMECOV_FW={bedtools=2.31.1}, CAT_FASTQ={cat=8.3}, CUSTOM_CATADDITIONALFASTA={python=3.9.5}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, CUSTOM_TX2GENE={python=3.9.5}, DESEQ2_QC_PSEUDO={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DESEQ2_QC_STAR_SALMON={r-base=4.0.3, bioconductor-deseq2=1.28.0}, DUPRADAR={bioconductor-dupradar=1.32.0}, FASTQC={fastqc=0.12.1}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.1}, GUNZIP_GTF={gunzip=1.1}, MULTIQC_CUSTOM_BIOTYPE={python=3.9.5}, PICARD_MARKDUPLICATES={picard=3.1.1}, QUALIMAP_RNASEQ={qualimap=2.3}, RSEQC_BAMSTAT={rseqc=5.0.2}, RSEQC_INFEREXPERIMENT={rseqc=5.0.2}, RSEQC_INNERDISTANCE={rseqc=5.0.2}, RSEQC_JUNCTIONANNOTATION={rseqc=5.0.2}, RSEQC_JUNCTIONSATURATION={rseqc=5.0.2}, RSEQC_READDISTRIBUTION={rseqc=5.0.2}, RSEQC_READDUPLICATION={rseqc=5.0.2}, SALMON_QUANT={salmon=1.10.1}, SAMTOOLS_FLAGSTAT={samtools=1.19.2}, SAMTOOLS_IDXSTATS={samtools=1.19.2}, SAMTOOLS_INDEX={samtools=1.19.2}, SAMTOOLS_SORT={samtools=1.19.2}, SAMTOOLS_STATS={samtools=1.19.2}, SE_GENE={bioconductor-summarizedexperiment=1.32.0}, STAR_ALIGN={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STAR_GENOMEGENERATE={star=2.7.10a, samtools=1.18, gawk=5.1.0}, STRINGTIE_STRINGTIE={stringtie=2.2.1}, SUBREAD_FEATURECOUNTS={subread=2.0.1}, TRIMGALORE={trimgalore=0.6.7, cutadapt=3.4}, TXIMETA_TXIMPORT={bioconductor-tximeta=1.20.1}, UCSC_BEDCLIP={ucsc=377}, UCSC_BEDGRAPHTOBIGWIG={ucsc=445}, UNTAR_SALMON_INDEX={untar=1.3}, Workflow={nf-core/rnaseq=v3.15.0dev}}" + "{BBMAP_BBSPLIT={bbmap=39.01}, CAT_FASTQ={cat=8.3}, CUSTOM_CATADDITIONALFASTA={python=3.9.5}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, CUSTOM_TX2GENE={python=3.9.5}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.1}, GUNZIP_GTF={gunzip=1.1}, SALMON_QUANT={salmon=1.10.1}, SE_GENE={bioconductor-summarizedexperiment=1.32.0}, TRIMGALORE={trimgalore=0.6.7, cutadapt=3.4}, TXIMETA_TXIMPORT={bioconductor-tximeta=1.20.1}, UNTAR_SALMON_INDEX={untar=1.3}, Workflow={nf-core/rnaseq=v3.15.0dev}}" ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-04T12:40:26.161319" + "timestamp": "2024-04-10T10:31:20.108379" } } \ No newline at end of file