Skip to content

Commit

Permalink
Merge pull request #1279 from adamrtalbot/pseudo_aligners_nftest
Browse files Browse the repository at this point in the history
Add psueudoaligner pipeline level tests to test suite
  • Loading branch information
adamrtalbot authored Apr 10, 2024
2 parents 05c12ca + 4299d47 commit f3aec8b
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 23 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

- 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
Expand Down Expand Up @@ -146,7 +124,7 @@ jobs:

confirm-pass:
runs-on: ubuntu-latest
needs: [test, pseudo]
needs: [test]
if: always()
steps:
- name: All tests ok
Expand Down
28 changes: 28 additions & 0 deletions tests/tests/kallisto/main.nf.test
Original file line number Diff line number Diff line change
@@ -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") }
)
}
}
}
12 changes: 12 additions & 0 deletions tests/tests/kallisto/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"software_versions": {
"content": [
"{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": "23.10.1"
},
"timestamp": "2024-04-10T10:13:15.867122"
}
}
28 changes: 28 additions & 0 deletions tests/tests/salmon/main.nf.test
Original file line number Diff line number Diff line change
@@ -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") }
)
}
}
}
12 changes: 12 additions & 0 deletions tests/tests/salmon/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"software_versions": {
"content": [
"{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": "23.10.1"
},
"timestamp": "2024-04-10T10:31:20.108379"
}
}

0 comments on commit f3aec8b

Please sign in to comment.