-
Notifications
You must be signed in to change notification settings - Fork 90
DSL2: nf-test conversion test_full
#1159
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
Open
TCLamnidis
wants to merge
18
commits into
dev
Choose a base branch
from
nf-test-full
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b78c96f
update test_full, and add initial nf-test
TCLamnidis 5ebe93b
bump fastqc memory
TCLamnidis a295a14
limit fastqc cores so each one gets more memory
TCLamnidis ed61d5b
update nf test documentation comment
TCLamnidis a6354cd
correct names in process block to DSL2 names
TCLamnidis 40e560c
Merge branch 'nf-test-full' of github.com:nf-core/eager into nf-test-…
TCLamnidis 9273182
Fix resource allocations
TCLamnidis 55973c7
Add WIP snapshot
TCLamnidis 9f0a8a3
Merge branch 'dev' into nf-test-full
TCLamnidis 589c307
linting template
TCLamnidis 05ed4cb
Fix resource allocations again
TCLamnidis e1a5bc6
fix linting
TCLamnidis 692dfdf
match logo in template
TCLamnidis ea555bd
Update test_full config and snapshot
TCLamnidis 335df61
adjust max memory to that or the GH runner
TCLamnidis a0ee08d
add resource limits
TCLamnidis 39265bf
linting
TCLamnidis bf566b8
Merge branch 'dev' into nf-test-full
TCLamnidis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| nextflow_pipeline { | ||
|
|
||
| name "Test pipeline: NFCORE_EAGER" | ||
| script "main.nf" | ||
| tag "pipeline" | ||
| tag "nfcore_eager" | ||
| tag "test_full" // Tag containing the name of the profile to test. Should match the profile name below | ||
| profile "test_full" // The name of the profile used when testing | ||
|
|
||
| test("Test `test_full` profile:") { | ||
|
|
||
| when { | ||
| params { | ||
| outdir = "$outputDir" | ||
| } | ||
| } | ||
|
|
||
| then { | ||
|
|
||
| /////////////////// | ||
| // DOCUMENTATION // | ||
| /////////////////// | ||
|
|
||
| // The contents of each top level results directory should be tested with individually named snapshots. | ||
| // Within each snapshot, there should be two to three distinct variables, that contain the files to be tested. | ||
| // - stable_name_<dir> is for files with variable md5sums (i.e. content) so only names will be compared | ||
| // - stable_content_<dir> is for files with stable md5sums (i.e. content) so md5sums will be compared | ||
| // - bams_<dir> is for BAM files, where the headerMD5 is checked for stability (since the content can be unstable) | ||
| // If a directory is fully stable, you can drop `stable_name_*` | ||
| // If a directory contains no BAMs, you can drop `bams_*` | ||
|
|
||
| // Due to the very long runtime of the full test, the snapshots were generated on the EVA computational cluster. | ||
| // Generate with: nf-test test --profile=+eva,archgen --tag test_full --update-snapshot | ||
| // Test with: nf-test test --profile=+eva,archgen --tag test_full | ||
| // NOTE: BAMs are always only stable in name, because: | ||
| // a) sharding breaks header since the shard that was first is named in the header (Fixed in https://github.com/nf-core/eager/pull/1112) | ||
| // b) the order of the reads in the BAMs is not stable (sorted, but reads that share a start position can be in any order) | ||
| // point b) also causes BAIs to be unstable. | ||
| // c) Merging of multiple BAMs with duplicate @RG / @PG tags can cause the header to be unstable (particularly in the case of shards/lanes) | ||
|
|
||
| ////////////////////// | ||
| // DEFINE VARIABLES // | ||
| ////////////////////// | ||
|
|
||
| // Define exclusion patterns for files with unstable contents | ||
| // NOTE: When a section needs more than a couple of small patterns, consider adding a variable to store the patterns here | ||
| // This is particularly important if the patterns excluded in the stable content section should be included in the stable name section | ||
| def unstable_patterns_auth = [ | ||
| '**/mapped_reads_gc-content_distribution.txt', | ||
| '**/mapped_reads_nucleotide_content.txt', | ||
| '**/genome_gc_content_per_window.png', | ||
| '**/*.{svg,pdf,html,png}', | ||
| '**/DamageProfiler.log', | ||
| '**/3p_freq_misincorporations.txt', | ||
| '**/5p_freq_misincorporations.txt', | ||
| '**/DNA_comp_genome.txt', | ||
| '**/DNA_composition_sample.txt', | ||
| '**/misincorporation.txt', | ||
| '**/genome_results.txt', | ||
| '**/*command.log', | ||
| ] | ||
|
|
||
| // Check that no files are missing/added | ||
| // Command legend: Result directory to index , includeDir: include dirs?, ignore: exclude patterns , ignoreFile: exclude pattern list , include: include patterns | ||
| def stable_name_all = getAllFilesFromDir("$outputDir/" , includeDir: false , ignore: ['pipeline_info/*'] , ignoreFile: null , include: ['*', '**/*'] ) | ||
|
|
||
| // Authentication | ||
| // def stable_content_authentication = getAllFilesFromDir("$outputDir/authentication" , includeDir: false , ignore: unstable_patterns_auth , ignoreFile: null , include: ['*', '**/*'] ) | ||
| // def stable_name_authentication = getAllFilesFromDir("$outputDir/authentication" , includeDir: false , ignore: null , ignoreFile: null , include: unstable_patterns_auth) | ||
|
|
||
| // // Deduplication | ||
| // def stable_content_deduplication = getAllFilesFromDir("$outputDir/deduplication" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.flagstat'] ) | ||
| // def stable_name_deduplication = getAllFilesFromDir("$outputDir/deduplication" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.{bam,bai}'] ) | ||
|
|
||
| // // Final_bams | ||
| // def stable_content_final_bams = getAllFilesFromDir("$outputDir/final_bams" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.flagstat'] ) | ||
| // def stable_name_final_bams = getAllFilesFromDir("$outputDir/final_bams" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.{bam,bai}'] ) | ||
|
|
||
| // // Mapping (incl. bam_input flasgstat) | ||
| // def stable_content_mapping = getAllFilesFromDir("$outputDir/mapping" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.flagstat'] ) | ||
| // def stable_name_mapping = getAllFilesFromDir("$outputDir/mapping" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.{bam,bai}'] ) | ||
|
|
||
| // // Preprocessing | ||
| // // NOTE: FastQC html appears stable, but I worry it might just include a day timestamp instead of a full timestamp. To keep the expression simpler I removed both from checksum testing. | ||
| // def stable_content_preprocessing = getAllFilesFromDir("$outputDir/preprocessing" , includeDir: false , ignore: ['**/*.{zip,log,html}'], ignoreFile: null , include: ['**/*'] ) | ||
| // def stable_name_preprocessing = getAllFilesFromDir("$outputDir/preprocessing" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.{zip,log,html}'] ) | ||
|
|
||
| // // Read filtering | ||
| // def stable_content_readfiltering = getAllFilesFromDir("$outputDir/read_filtering" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.flagstat'] ) | ||
| // def stable_name_readfiltering = getAllFilesFromDir("$outputDir/read_filtering" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.{bam,bai}'] ) | ||
|
|
||
| // // Genotyping | ||
| // def stable_content_genotyping = getAllFilesFromDir("$outputDir/genotyping" , includeDir: false , ignore: ['**/*.{tbi,vcf.gz}'] , ignoreFile: null , include: ['**/*'] ) | ||
| // def stable_name_genotyping = getAllFilesFromDir("$outputDir/genotyping" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.tbi'] ) | ||
| // // We need to collect the vcfs separately to run more specific md5sum checks on the header (contnts are unstable due to same reasons as BAMs, explained above). | ||
| // def genotyping_vcfs = getAllFilesFromDir("$outputDir/genotyping" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.vcf.gz'] ) | ||
|
|
||
| // // Metagenomics | ||
| // def stable_content_metagenomics = getAllFilesFromDir("$outputDir/metagenomics" , includeDir: false , ignore: ['**/*.biom', '**/*table.tsv'] , ignoreFile: null , include: ['**/*'] ) | ||
| // def stable_name_metagenomics = getAllFilesFromDir("$outputDir/metagenomics" , includeDir: false , ignore: null , ignoreFile: null , include: ['**/*.biom', '**/*table.tsv'] ) | ||
|
|
||
| // MultiQC | ||
| // def stable_name_multiqc = getAllFilesFromDir("$outputDir/multiqc" , includeDir: false , ignore: null , ignoreFile: null , include: ['*', '**/*'] ) | ||
|
|
||
| /////////////////////// | ||
| // DEFINE ASSERTIONS // | ||
| /////////////////////// | ||
|
|
||
| assertAll( | ||
| { assert workflow.success }, | ||
| // This checks that there are no missing or additional output files. | ||
| // Also a good starting point to look at all the files in the output folder than need to be checked in subsequent sections. | ||
| { assert snapshot( stable_name_all*.name ).match("all_files") }, | ||
|
|
||
| // Checking changes to contents of each section | ||
| // NOTE: Keep the order of the sections in the alphanumeric order of the output directories. | ||
| // Each section should first check stable_content, stable_name second (if applicable). | ||
| // { assert snapshot( stable_content_authentication , stable_name_authentication*.name ).match("authentication") }, | ||
| // { assert snapshot( stable_content_deduplication , stable_name_deduplication*.name ).match("deduplication") }, | ||
| // { assert snapshot( stable_content_final_bams , stable_name_final_bams*.name ).match("final_bams") }, | ||
| // // NOTE: The snapshot section for mapping cannot be named 'mapping'. See https://github.com/askimed/nf-test/issues/279 | ||
| // { assert snapshot( stable_content_mapping , stable_name_mapping*.name ).match("mapping_output") }, | ||
| // { assert snapshot( stable_content_preprocessing , stable_name_preprocessing*.name ).match("preprocessing") }, | ||
| // { assert snapshot( stable_content_readfiltering , stable_name_readfiltering*.name ).match("read_filtering") }, | ||
| // { assert snapshot( stable_content_genotyping , stable_name_genotyping*.name ).match("genotyping") }, | ||
| // // Additional checks on the genotyping VCFs for content. Specifically the md5sums of the header FORMAT, INFO, FILTER, CONTIG lines, and sample names | ||
| // { assert snapshot( | ||
| // genotyping_vcfs.collect { | ||
| // file -> | ||
| // def vcf_head = path(file.toString()).vcf.header | ||
| // // The header contains lines in the "OTHER" category, which contain a timestamp and/or work dir paths, so we need to filter those out, then calculate md5sums. | ||
| // def header_md5 = [ | ||
| // vcf_head.getFormatHeaderLines().toString(), | ||
| // vcf_head.getInfoHeaderLines().toString(), | ||
| // vcf_head.getFilterLines().toString(), | ||
| // vcf_head.getIDHeaderLines().toString(), | ||
| // vcf_head.getGenotypeSamples().toString(), | ||
| // vcf_head.getContigLines().toString(), | ||
| // ].join(' ').md5() | ||
| // file.getName() + ":header_md5," + header_md5 | ||
| // } | ||
| // ).match("genotyping_vcfs")}, | ||
| // { assert snapshot( stable_content_metagenomics , stable_name_metagenomics*.name ).match("metagenomics") }, | ||
| // { assert snapshot( stable_name_multiqc*.name ).match("multiqc") }, | ||
|
|
||
| // Versions | ||
| { assert new File("$outputDir/pipeline_info/nf_core_eager_software_mqc_versions.yml").exists() }, | ||
|
|
||
| ) | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| { | ||
| "all_files": { | ||
| "content": [ | ||
| [ | ||
| "COD076_COD076E1bL1_GCF_902167405.1_gadMor3.0_rna.c_curve.txt", | ||
| "COD076_COD076E1bL1_GCF_902167405.1_gadMor3.0_rna.command.log", | ||
| "COD092_COD092E1bL1i69_GCF_902167405.1_gadMor3.0_rna.c_curve.txt", | ||
| "COD092_COD092E1bL1i69_GCF_902167405.1_gadMor3.0_rna.command.log", | ||
| "COD076_COD076E1bL1_GCF_902167405.1_gadMor3.0_rna_sorted.bam", | ||
| "COD076_COD076E1bL1_GCF_902167405.1_gadMor3.0_rna_sorted.bam.bai", | ||
| "COD092_COD092E1bL1i69_GCF_902167405.1_gadMor3.0_rna_sorted.bam", | ||
| "COD092_COD092E1bL1i69_GCF_902167405.1_gadMor3.0_rna_sorted.bam.bai", | ||
| "COD076_COD076E1bL1_GCF_902167405.1_gadMor3.0_rna_sorted.flagstat", | ||
| "COD092_COD092E1bL1i69_GCF_902167405.1_gadMor3.0_rna_sorted.flagstat", | ||
| "COD076_COD076E1bL1_L1.fastp.html", | ||
| "COD076_COD076E1bL1_L1.fastp.json", | ||
| "COD076_COD076E1bL1_L1.fastp.log", | ||
| "COD076_COD076E1bL1_L6.fastp.html", | ||
| "COD076_COD076E1bL1_L6.fastp.json", | ||
| "COD076_COD076E1bL1_L6.fastp.log", | ||
| "COD076_COD076E1bL1_L8.fastp.html", | ||
| "COD076_COD076E1bL1_L8.fastp.json", | ||
| "COD076_COD076E1bL1_L8.fastp.log", | ||
| "COD092_COD092E1bL1i69_L6.fastp.html", | ||
| "COD092_COD092E1bL1i69_L6.fastp.json", | ||
| "COD092_COD092E1bL1i69_L6.fastp.log", | ||
| "COD092_COD092E1bL1i69_L7.fastp.html", | ||
| "COD092_COD092E1bL1i69_L7.fastp.json", | ||
| "COD092_COD092E1bL1i69_L7.fastp.log", | ||
| "COD092_COD092E1bL1i69_L8.fastp.html", | ||
| "COD092_COD092E1bL1i69_L8.fastp.json", | ||
| "COD092_COD092E1bL1i69_L8.fastp.log", | ||
| "COD076_COD076E1bL1_L1_fastqc.html", | ||
| "COD076_COD076E1bL1_L1_fastqc.zip", | ||
| "COD076_COD076E1bL1_L6_fastqc.html", | ||
| "COD076_COD076E1bL1_L6_fastqc.zip", | ||
| "COD076_COD076E1bL1_L8_fastqc.html", | ||
| "COD076_COD076E1bL1_L8_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L6_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L6_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L7_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L7_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L8_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L8_fastqc.zip", | ||
| "COD076_COD076E1bL1_L1_1_fastqc.html", | ||
| "COD076_COD076E1bL1_L1_1_fastqc.zip", | ||
| "COD076_COD076E1bL1_L1_2_fastqc.html", | ||
| "COD076_COD076E1bL1_L1_2_fastqc.zip", | ||
| "COD076_COD076E1bL1_L6_1_fastqc.html", | ||
| "COD076_COD076E1bL1_L6_1_fastqc.zip", | ||
| "COD076_COD076E1bL1_L6_2_fastqc.html", | ||
| "COD076_COD076E1bL1_L6_2_fastqc.zip", | ||
| "COD076_COD076E1bL1_L8_1_fastqc.html", | ||
| "COD076_COD076E1bL1_L8_1_fastqc.zip", | ||
| "COD076_COD076E1bL1_L8_2_fastqc.html", | ||
| "COD076_COD076E1bL1_L8_2_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L6_1_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L6_1_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L6_2_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L6_2_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L7_1_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L7_1_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L7_2_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L7_2_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L8_1_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L8_1_fastqc.zip", | ||
| "COD092_COD092E1bL1i69_L8_2_fastqc.html", | ||
| "COD092_COD092E1bL1i69_L8_2_fastqc.zip" | ||
| ] | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.10.2" | ||
| }, | ||
| "timestamp": "2026-01-23T04:03:22.466351835" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.