Skip to content
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

run_preseq param + skip preseq/lcextrap by default #470

Merged
merged 3 commits into from
Nov 27, 2024
Merged
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
- 🔧 Install `fastq_align_dedup_bismark` subworkflow from nf-core/subworkflows [#453](https://github.com/nf-core/methylseq/pull/457)
- 🔧 Install `fasta_index_bismark_bwameth` subworkflow from nf-core/subworkflows [#466](https://github.com/nf-core/methylseq/pull/)
- 🔧 Install `fastq_align_dedup_bwameth` subworkflow from nf-core/subworkflows [#467](https://github.com/nf-core/methylseq/pull/)
- 🔧 reorg individual configs to `conf/modules/` named configs [#459](https://github.com/nf-core/methylseq/pull/)
- 🔧 reorg individual configs to `conf/modules/` named configs [#459](https://github.com/nf-core/methylseq/pull/469)
- 🔧 `run_preseq` param + skip preseq/lcextrap module by default [#458](https://github.com/nf-core/methylseq/pull/470)

## [v2.7.1](https://github.com/nf-core/methylseq/releases/tag/2.7.1) - [2024-10-27]

Expand Down
6 changes: 4 additions & 2 deletions conf/modules/preseq_lcextrap.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ process {
[
path: { "${params.outdir}/${params.aligner}/preseq" },
mode: params.publish_dir_mode,
pattern: "*.txt"
pattern: "*.txt",
enabled: params.run_preseq
],
[
path: { "${params.outdir}/${params.aligner}/preseq/log" },
mode: params.publish_dir_mode,
pattern: "*.log"
pattern: "*.log",
enabled: params.run_preseq
]
]
}
Expand Down
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ params {
skip_deduplication = false
skip_multiqc = false

// Run options
run_preseq = false

// Boilerplate options
outdir = null
publish_dir_mode = 'copy'
Expand Down
17 changes: 17 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,20 @@
},
"fa_icon": "fas fa-fast-forward"
},
"run_pipeline_steps": {
"title": "Run pipeline steps",
"type": "object",
"description": "",
"default": "",
"properties": {
"run_preseq": {
"type": "boolean",
"description": "Run preseq/lcextrap tool",
"fa_icon": "fas fa-fast-forward"
}
},
"fa_icon": "fas fa-fast-forward"
},
"institutional_config_options": {
"title": "Institutional config options",
"type": "object",
Expand Down Expand Up @@ -613,6 +627,9 @@
{
"$ref": "#/$defs/skip_pipeline_steps"
},
{
"$ref": "#/$defs/run_pipeline_steps"
},
{
"$ref": "#/$defs/generic_options"
},
Expand Down
59 changes: 59 additions & 0 deletions tests/bismark_run_preseq.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
nextflow_pipeline {

name "Test Workflow main.nf"
script "../main.nf"
config "./nextflow.config"

test("Params: bismark | run_preseq") {
when {
params {
outdir = "$outputDir"
run_preseq = true
}
}

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')
// bam_files: All bam files
def bam_files = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
assertAll(
{ assert workflow.success},
{ assert snapshot(
// Number of tasks
workflow.trace.succeeded().size(),
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"),
// All stable path name
stable_name,
// All files with stable contents
stable_path,
// All bam files
bam_files.collect{ file -> [ file.getName(), bam(file.toString()).getReadsMD5() ] }
).match() }
)
}
}

test("Params: bismark | run_preseq with bowtie2-index") {
when {
params {
bismark_index = "https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bowtie2_Index.tar.gz"
outdir = "$outputDir"
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(
// Number of tasks
workflow.trace.succeeded().size()
).match() }
)
}
}

}
Loading