Skip to content

Add new test_alternatives process - missing some processes #834

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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Runs all default tools, with a couple of 'would most likely run anyway' options.

Use as follows:
nextflow run nf-core/mag -profile test,<docker/singularity> --outdir <OUTDIR>
Expand Down
50 changes: 50 additions & 0 deletions conf/test_alternatives.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Includes all third mutually exclusive options, and performs coassembly

Use as follows:
nextflow run nf-core/mag -profile test_alternatives,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 4,
memory: '15.GB',
time: '1.h',
]
}

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Input data
input = params.pipelines_testdata_base_path + 'mag/samplesheets/samplesheet.multirun.v4.csv'

clip_tool = 'trimmomatic'

min_length_unbinned_contigs = 1
max_unbinned_contigs = 2

coassemble_group = true

// Including (even length filtered) CONOCT bins adds another 5 minutes, so we skip it in the default test (testing in assemblyinput)
skip_concoct = true

binqc_tool = 'checkm2'
bin_domain_classification = true

// Prokka is the slowest step of the tests, so we speed up by turning off CDS/product searching
prokka_fast_mode = true
gtdb_db = params.pipelines_testdata_base_path + 'mag/databases/gtdbtk/gtdbtk_mockup_20250422.tar.gz'
cat_db = params.pipelines_testdata_base_path + 'mag/databases/cat/minigut_cat.tar.gz'
cat_no_suggestive_asterisks = true
gtdbtk_min_completeness = 0.01
// Required for the small GTDBTk dummy database aa
gtdbtk_use_full_tree = true
}
3 changes: 2 additions & 1 deletion conf/test_single_end.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Runs with single-end input, with second mutually exclusive options,
and runs the ancient DNA mode.

Use as follows:
nextflow run nf-core/mag -profile test_single_end,<docker/singularity> --outdir <OUTDIR>
Expand Down Expand Up @@ -33,7 +35,6 @@ params {
spades_fix_cpus = 1
binning_map_mode = 'own'
ancient_dna = true
binning_map_mode = 'own'
skip_spades = false
skip_spadeshybrid = true
bcftools_view_high_variant_quality = 0
Expand Down
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ profiles {
test_longread {
includeConfig 'conf/test_longread.config'
}
test_alternatives {
includeConfig 'conf/test_alternatives.config'
}
}

// Load nf-core custom profiles from different institutions
Expand Down
37 changes: 37 additions & 0 deletions tests/test_alternatives.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
nextflow_pipeline {

name "Test pipeline"
script "../main.nf"
tag "pipeline"
tag "test_alternatives"
profile "test_alternatives"

test("-profile test_single_end") {

when {
params {
outdir = "$outputDir"
}
}

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_path: All files in ${params.outdir}/ with stable content
// def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
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_mag_software_mqc_versions.yml"),
// // All stable path name, with a relative path
// stable_name,
// // All files with stable contents
// stable_path
).match() }
)
}
}
}
126 changes: 126 additions & 0 deletions tests/test_alternatives.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"-profile test_single_end": {
"content": [
130,
{
"BOWTIE2_ASSEMBLY_ALIGN": {
"bowtie2": "2.4.2",
"samtools": 1.11,
"pigz": "2.3.4"
},
"BOWTIE2_PHIX_REMOVAL_ALIGN": {
"bowtie2": "2.4.2"
},
"CATPACK_ADDNAMES_BINS": {
"catpack": 6.0
},
"CATPACK_BINS": {
"catpack": 6.0
},
"CATPACK_SUMMARISE_BINS": {
"catpack": 6.0
},
"CAT_FASTQ": {
"cat": 9.5
},
"CHECKM2_PREDICT": {
"checkm2": "1.1.0"
},
"CONCAT_BINQC_TSV": {
"csvtk": "0.31.0"
},
"CONVERT_DEPTHS": {
"bioawk": 20110810
},
"DASTOOL_FASTATOCONTIG2BIN_TIARA": {
"dastool": "1.1.6"
},
"FASTQC_RAW": {
"fastqc": "0.12.1"
},
"FASTQC_TRIMMED": {
"fastqc": "0.12.1"
},
"GTDBTK_CLASSIFYWF": {
"gtdbtk": "2.4.0"
},
"GUNZIP_BINS": {
"gunzip": 1.13
},
"GUNZIP_SHORTREAD_ASSEMBLIES": {
"gunzip": 1.13
},
"GUNZIP_UNBINS": {
"gunzip": 1.13
},
"MAG_DEPTHS": {
"python": "3.6.7",
"pandas": "1.1.5"
},
"MAG_DEPTHS_PLOT": {
"python": "3.9.6",
"pandas": "1.3.0",
"seaborn": "0.11.0"
},
"MAG_DEPTHS_SUMMARY": {
"python": "3.10.6",
"pandas": "1.4.3"
},
"MAXBIN2": {
"maxbin2": "2.2.7"
},
"MEGAHIT": {
"megahit": "1.2.9"
},
"METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS_SHORTREAD": {
"metabat2": 2.15
},
"METABAT2_METABAT2": {
"metabat2": 2.15
},
"METASPADES": {
"spades": "4.1.0"
},
"POOL_PAIRED_READS": {
"cat": 8.3
},
"PRODIGAL": {
"prodigal": "2.6.3",
"pigz": 2.6
},
"PROKKA": {
"prokka": "1.14.6"
},
"QUAST": {
"python": "3.7.6",
"metaquast": "5.0.2"
},
"QUAST_BINS": {
"python": "3.7.6",
"metaquast": "5.0.2"
},
"SPLIT_FASTA": {
"python": "3.6.7",
"biopython": "1.7.4",
"pandas": "1.1.5"
},
"TIARA_TIARA": {
"tiara": "1.0.3"
},
"TRIMMOMATIC": {
"trimmomatic": 0.39
},
"Workflow": {
"nf-core/mag": "v4.1.0dev"
},
"r-base": "4.1.3",
"r-tidyverse": "1.3.1"
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.4"
},
"timestamp": "2025-06-22T05:43:48.636211777"
}
}
Loading