Skip to content

Commit

Permalink
add mergeContext to methyldackel extract comprehensive + comprehensiv…
Browse files Browse the repository at this point in the history
…e tests
  • Loading branch information
sateeshperi committed Dec 17, 2024
1 parent 68b9d40 commit 40a4cf1
Show file tree
Hide file tree
Showing 6 changed files with 734 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Pipeline Updates

-
- 🔧 Add `--mergeContext` ext.arg to `methyldackel/extract` when running with `--comprehensive` param to merge metrics from individual Cytosines in a CpG, producing per-CpG metrics rather than per-Cytosine metrics [#460](https://github.com/nf-core/methylseq/pull/)

## [v3.0.0](https://github.com/nf-core/methylseq/releases/tag/3.0.0) - [2024-12-16]

Expand Down
2 changes: 1 addition & 1 deletion conf/modules/methyldackel_extract.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process {
withName: METHYLDACKEL_EXTRACT {
ext.args = [
params.comprehensive ? ' --CHG --CHH' : '',
params.comprehensive ? ' --CHG --CHH --mergeContext' : '',
params.ignore_flags ? " --ignoreFlags" : '',
params.methyl_kit ? " --methylKit" : '',
params.min_depth > 0 ? " --minDepth ${params.min_depth}" : ''
Expand Down
41 changes: 41 additions & 0 deletions tests/bismark_comprehensive.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
nextflow_pipeline {

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

test("Params: bismark | comprehensive") {
when {
params {
aligner = "bismark"
comprehensive = true
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')
// 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_methylseq_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() }
)
}
}
}
Loading

0 comments on commit 40a4cf1

Please sign in to comment.