Skip to content

Commit

Permalink
Merge pull request #1272 from nf-core/pipeline_level_tests_simple
Browse files Browse the repository at this point in the history
Simple pipeline level nf-tests
  • Loading branch information
adamrtalbot authored Apr 9, 2024
2 parents f6fa12c + 76473d2 commit 943e271
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 72 deletions.
69 changes: 1 addition & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,73 +19,6 @@ concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true
jobs:
star_salmon:
name: Test STAR Salmon 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:
- "--skip_qc"
- "--skip_trimming"
- "--min_mapped_reads 90"
- "--with_umi"
- "--with_umi --skip_trimming"
- "--remove_ribo_rna --skip_qualimap"
- "--bam_csi_index"
- "--save_align_intermeds --save_reference"
- "--featurecounts_group_type false"
- "--trimmer fastp"

steps:
- name: Check out pipeline code
uses: actions/checkout@v4

- name: Setup Nextflow
uses: nf-core/[email protected]

- name: Run pipeline with STAR and various parameters
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner star_salmon ${{ matrix.parameters }} --outdir ./results
star_rsem:
name: Test STAR RSEM 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:
- "--skip_qc"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4

- name: Setup Nextflow
uses: nf-core/[email protected]

- name: Run pipeline with RSEM STAR and various parameters
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner star_rsem ${{ matrix.parameters }} --outdir ./results
hisat2:
name: Test HISAT2 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:
- "--skip_qc"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4

- name: Setup Nextflow
uses: nf-core/[email protected]

- name: Run pipeline with HISAT2 and various parameters
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner hisat2 ${{ matrix.parameters }} --outdir ./results
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]') }}
Expand Down Expand Up @@ -244,7 +177,7 @@ jobs:

confirm-pass:
runs-on: ubuntu-latest
needs: [test, star_salmon, star_rsem, hisat2, pseudo]
needs: [test, pseudo]
if: always()
steps:
- name: All tests ok
Expand Down
2 changes: 1 addition & 1 deletion nf-test.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config {
workDir System.getenv("NFT_WORKDIR") ?: ".nf-test"

// Location of an optional nextflow.config file specific for executing pipeline tests
configFile "tests/nextflow.config"
configFile "tests/config/nextflow.config"

profile "test"
}
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/main.nf.test → tests/tests/default/main.nf.test
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
nextflow_pipeline {

name "Test pipeline"
script "../main.nf"
script "../../../main.nf"
tag "rnaseq"
tag "PIPELINE"

test("Run with profile test") {
test("Default profile test") {

when {
params {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"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={r-base=4.3.2, 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}, 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",
Expand Down
22 changes: 22 additions & 0 deletions tests/tests/featurecounts/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
nextflow_pipeline {

name "Test pipeline"
script "../../../main.nf"
tag "rnaseq"
tag "PIPELINE"

test("--featurecounts_group_type false") {

when {
params {
outdir = "$outputDir"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv'
featurecounts_group_type = false
}
}

then {
assert workflow.success
}
}
}
22 changes: 22 additions & 0 deletions tests/tests/min_mapped_reads/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
nextflow_pipeline {

name "Test pipeline"
script "../../../main.nf"
tag "rnaseq"
tag "PIPELINE"

test("--min_mapped_reads 90") {

when {
params {
outdir = "$outputDir"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv'
min_mapped_reads = 90
}
}

then {
assert workflow.success
}
}
}
22 changes: 22 additions & 0 deletions tests/tests/remove_ribo_rna/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
nextflow_pipeline {

name "Test pipeline"
script "../../../main.nf"
tag "rnaseq"
tag "PIPELINE"

test("--remove_ribo_rna") {

when {
params {
outdir = "$outputDir"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv'
remove_ribo_rna = true
}
}

then {
assert workflow.success
}
}
}
22 changes: 22 additions & 0 deletions tests/tests/skip_qc/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
nextflow_pipeline {

name "Test pipeline"
script "../../../main.nf"
tag "rnaseq"
tag "PIPELINE"

test("--skip_qc") {

when {
params {
outdir = "$outputDir"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv'
skip_qc = true
}
}

then {
assert workflow.success
}
}
}
22 changes: 22 additions & 0 deletions tests/tests/skip_trimming/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
nextflow_pipeline {

name "Test pipeline"
script "../../../main.nf"
tag "rnaseq"
tag "PIPELINE"

test("--skip_trimming") {

when {
params {
outdir = "$outputDir"
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv'
skip_qc = true
}
}

then {
assert workflow.success
}
}
}

0 comments on commit 943e271

Please sign in to comment.