-
Notifications
You must be signed in to change notification settings - Fork 59
Add more nf tests #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Add more nf tests #655
Changes from 25 commits
4ed1b68
8bf2634
71d6871
e6bd9d7
d9c451f
ba7587f
0b11065
4bcc295
e6a3fc1
4f9b489
02384c5
f648259
7b9e01d
38f4e7d
0f7b403
570e214
bc690e3
7af0f8c
1352e64
f37ab27
151fecb
1cd44fb
22652de
ecce43f
3faf15d
362069d
50c48af
b4c600c
39837e0
d990ce8
f82e739
39da5c5
3e3e7f3
bf0fa89
974ff69
5c42f34
9fdc72b
a1ba47d
1f3a09a
043a37f
19585d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,22 +15,113 @@ nextflow_pipeline { | |
| } | ||
|
|
||
| then { | ||
| // stable_name: All files + folders in ${params.outdir}/ with a stable name | ||
| // def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) | ||
| // stable_name: All files + folders in ${params.outdir}/ with a stable name | ||
| def stable_name_all = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) | ||
| // stable_path: All files in ${params.outdir}/ with stable content | ||
| // def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') | ||
| def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') | ||
|
|
||
| //MultiQC | ||
| def stable_name_multiqc = getAllFilesFromDir("$outputDir/multiqc", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //BBDuk | ||
| def stable_content_bbduk = getAllFilesFromDir("$outputDir/bbduk", relative: true, includeDir: false, ignore: ['*.log'], ignoreFile: null, include: ['*','**/*']) | ||
| def stable_name_bbduk = getAllFilesFromDir("$outputDir/bbduk", relative: true, includeDir: false, ignore: null , ignoreFile: null, include: ['**/*.fastq.gz'] ) | ||
|
|
||
| //DIAMOND | ||
| def stable_content_diamond = getAllFilesFromDir("$outputDir/diamond", relative: true, includeDir: false, ignore: ['*/*.{tsv,log,txt}'], ignoreFile: null, include: ['*','**/*']) | ||
| def stable_name_diamond = getAllFilesFromDir("$outputDir/diamond", relative: true, includeDir: false, ignore: null , ignoreFile: null, include: ['**/*.{tsv,log,txt}'] ) | ||
|
|
||
| //nonpareil | ||
| def stable_content_nonpareil = getAllFilesFromDir("$outputDir/nonpareil", relative: true, includeDir: false, ignore: ['*.{svg,npa}'] , ignoreFile: null, include: ['*','**/*']) | ||
| def stable_name_nonpareil = getAllFilesFromDir("$outputDir/nonpareil", relative: true, includeDir: false, ignore: null , ignoreFile: null, include: ['**/*.{svg,npa}'] ) | ||
|
|
||
| //kraken2 | ||
| def stable_name_kraken2 = getAllFilesFromDir("$outputDir/kraken2", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //bowtie2 | ||
| def stable_name_bowtie2 = getAllFilesFromDir("$outputDir/bowtie2", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //bracken | ||
| def stable_name_bracken = getAllFilesFromDir("$outputDir/bracken", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //centrifuge | ||
| def stable_name_centrifuge = getAllFilesFromDir("$outputDir/centrifuge", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //fastp | ||
| def stable_content_fastp = getAllFilesFromDir("$outputDir/fastp", relative: true, includeDir: false, ignore: ['*.{log}'] , ignoreFile: null, include: ['*','**/*']) | ||
| def stable_name_fastp = getAllFilesFromDir("$outputDir/fastp", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*.log']) | ||
|
|
||
| //ganon | ||
| def stable_name_ganon = getAllFilesFromDir("$outputDir/ganon", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //kaiju | ||
| def stable_content_kaiju = getAllFilesFromDir("$outputDir/kaiju", relative: true, includeDir: false, ignore: ['*.{tsv}'] , ignoreFile: null, include: ['*','**/*']) | ||
| def stable_name_kaiju = getAllFilesFromDir("$outputDir/kaiju", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*.tsv']) | ||
|
|
||
| //kmcp | ||
| def stable_name_kmcp = getAllFilesFromDir("$outputDir/kmcp", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| // krona | ||
| def stable_name_krona = getAllFilesFromDir("$outputDir/krona", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| // metaphlan | ||
| def stable_name_metaphlan = getAllFilesFromDir("$outputDir/metaphlan", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| // nanoq | ||
| def stable_name_nanoq = getAllFilesFromDir("$outputDir/nanoq", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| // porechop_abi | ||
| def stable_content_porechopabi = getAllFilesFromDir("$outputDir/porechop_abi", relative: true, includeDir: false, ignore: ['*.{log}'] , ignoreFile: null, include: ['*','**/*']) | ||
| def stable_name_porechopabi = getAllFilesFromDir("$outputDir/porechop_abi", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*.log']) | ||
|
|
||
| // samtools | ||
| def stable_name_samtools = getAllFilesFromDir("$outputDir/samtools", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
| //taxpasta | ||
| def stable_name_taxpasta = getAllFilesFromDir("$outputDir/taxpasta", relative: true, includeDir: false, ignore: null, ignoreFile: null, include: ['*', '**/*']) | ||
|
|
||
|
|
||
| assertAll( | ||
| { assert workflow.success}, | ||
| { assert snapshot( | ||
| // Number of successful tasks | ||
| workflow.trace.succeeded().size(), | ||
| // pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions | ||
| removeNextflowVersion("$outputDir/pipeline_info/nf_core_taxprofiler_software_mqc_versions.yml"), | ||
| // All stable path name, with a relative path | ||
| // stable_name, | ||
| // All files with stable contents | ||
| //stable_path | ||
| ).match() } | ||
| ).match() }, | ||
|
|
||
| { assert new File("$outputDir/pipeline_info/nf_core_taxprofiler_software_mqc_versions.yml").exists() }, | ||
| { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, | ||
|
|
||
| { assert snapshot ( stable_name_all ).match("all_files") }, | ||
| { assert snapshot ( stable_name_multiqc ).match("multiqc" ) }, | ||
sofstam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { assert snapshot( file("$outputDir/bbduk/2613_ERR5766181.bbduk.log").text.contains("Reads Processed:"), [stable_content_bbduk, stable_name_bbduk]).match("bbduk")}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why have you put content/name as a list here?, they can be independent entries There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will do so! |
||
| { assert snapshot ( stable_content_diamond, stable_name_diamond ).match("diamond" ) }, | ||
| { assert snapshot ( stable_content_nonpareil, stable_name_nonpareil ).match("nonpareil" ) }, | ||
| { assert snapshot ( stable_name_kraken2, file ("$outputDir/kraken2/db2/2613_db2.kraken2.kraken2.report.txt").text.contains("S288C")).match("kraken2") }, | ||
| { assert snapshot(path("$outputDir/kraken2/db2/2613_db2.kraken2.kraken2.report.txt").md5).match("kraken2_md5") }, | ||
sofstam marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { assert snapshot ( stable_name_bowtie2, file ("$outputDir/bowtie2/align/2613_ERR5766181.bowtie2.log").text.contains("overall alignment rate")).match("bowtie2" ) }, | ||
| { assert snapshot(path("$outputDir/bowtie2/align/2613_ERR5766181.bowtie2.log").md5).match("bowtie2_md5") }, | ||
| { assert snapshot ( stable_name_bracken, file ("$outputDir/bracken/db1/2613_db1.bracken.tsv").text.contains("Homo sapiens")).match("bracken") }, | ||
| { assert snapshot(path("$outputDir/bracken/db1/2613_db1.bracken.tsv").md5).match("bracken_md5") }, | ||
| { assert snapshot ( stable_name_centrifuge, file ("$outputDir/centrifuge/db3/2613_db3.centrifuge.report.txt").text.contains("Eucommia")).match("centrifuge") }, | ||
| { assert snapshot(path("$outputDir/centrifuge/db3/2613_db3.centrifuge.report.txt").md5).match("centrifuge_md5") }, | ||
| { assert snapshot ( file ("$outputDir/fastp/2613_ERR5766181.fastp.log").text.contains("Read pairs merged"),[stable_content_fastp, stable_name_fastp] ).match("fastp") }, | ||
| { assert snapshot ( stable_name_ganon, file ("$outputDir/ganon/db1/2613_db1.ganon.tre").text.contains("Saccharomycetales")).match("ganon") }, | ||
| { assert snapshot(path("$outputDir/ganon/db1/2613_db1.ganon.tre").md5).match("ganon_md5") }, | ||
|
||
| { assert snapshot ( file ("$outputDir/kaiju/db6/2614_db6.kaiju.tsv").text.contains("ERR3201952.3225565"),[stable_content_kaiju, stable_name_kaiju] ).match("kaiju") }, | ||
|
||
| { assert snapshot ( stable_name_kmcp, file ("$outputDir/kmcp/db1/2613_db1.kmcp.profile").text.contains("NW_024067565.1")).match("kmcp") }, | ||
| { assert snapshot(path("$outputDir/kmcp/db1/2613_db1.kmcp.profile").md5).match("kmcp_md5") }, | ||
| { assert snapshot ( stable_name_krona ).match("krona" ) }, | ||
| { assert snapshot ( stable_name_metaphlan, file ("$outputDir/metaphlan/metaphlan4/2613_metaphlan4.metaphlan_profile.txt").text.contains("SGB4933_group")).match("metaphlan") }, | ||
| { assert snapshot(path("$outputDir/metaphlan/metaphlan4/2613_metaphlan4.metaphlan_profile.txt").md5).match("metaphlan_profile_md5") }, | ||
| { assert snapshot ( stable_name_nanoq, file ("$outputDir/nanoq/ERR3201952_ERR3201952_filtered.stats").text.contains("Median read quality")).match("nanoq") }, | ||
| { assert snapshot(path("$outputDir/nanoq/ERR3201952_ERR3201952_filtered.stats").md5).match("nanoq_md5") }, | ||
| { assert snapshot ( file ("$outputDir/porechop_abi/ERR3201952_ERR3201952_porechop_abi.log").text.contains("reads were split"), [stable_name_porechopabi, stable_content_porechopabi]).match("porechop_abi") }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The list thingy again here... |
||
| { assert snapshot ( stable_name_samtools, file ("$outputDir/samtools/stats/2613_ERR5766181.stats").text.contains("mismatches:")).match("samtools") }, | ||
| { assert snapshot(path("$outputDir/samtools/stats/2613_ERR5766181.stats").md5).match("samtools_md5") }, | ||
| { assert snapshot ( stable_name_taxpasta, file ("$outputDir/taxpasta/metaphlan_metaphlan4.tsv").text.contains("186803")).match("taxpasta") }, | ||
| { assert snapshot(path("$outputDir/taxpasta/metaphlan_metaphlan4.tsv").md5).match("taxpasta_md5") }, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.