Skip to content

Commit

Permalink
Merge pull request #177 from nf-core/homer-uniqmap
Browse files Browse the repository at this point in the history
test(#57): Add uniqmap test
  • Loading branch information
edmundmiller authored Dec 21, 2024
2 parents bb5a3a8 + 96a9f4d commit 2d19d95
Show file tree
Hide file tree
Showing 8 changed files with 270 additions and 21 deletions.
4 changes: 2 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},
"homer/findpeaks": {
"branch": "master",
"git_sha": "b108745a1d59778e21577c217a963e17b8ba9bc2",
"git_sha": "cac282aeb4099300e04b60167a3a12d8c96c4978",
"installed_by": ["homer_groseq"]
},
"homer/maketagdirectory": {
Expand Down Expand Up @@ -315,7 +315,7 @@
},
"homer_groseq": {
"branch": "master",
"git_sha": "b108745a1d59778e21577c217a963e17b8ba9bc2",
"git_sha": "cac282aeb4099300e04b60167a3a12d8c96c4978",
"installed_by": ["subworkflows"]
},
"utils_nextflow_pipeline": {
Expand Down
44 changes: 42 additions & 2 deletions modules/nf-core/homer/findpeaks/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions modules/nf-core/homer/findpeaks/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions subworkflows/nf-core/homer_groseq/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 13 additions & 11 deletions subworkflows/nf-core/homer_groseq/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions workflows/tests/inputs/uniqmap/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
nextflow_pipeline {

name "HOMER Uniqmap"
script "../../../../main.nf"
tag "input"
tag "homer"

test("Should run with an zipped uniqmap") {

config "./nextflow.config"

when {
params {
outdir = "$outputDir"
use_homer_uniqmap = true
homer_uniqmap = 'https://raw.githubusercontent.com/nf-core/test-datasets/nascent/reference/uniqmap.GRCh38_chr21.50nt.zip'
skip_grohmm = true
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml")).match("software_versions") },
// Files should have -uniqmap <directory> in the header
{ assert path("$outputDir/transcript_identification/homer/cd4.bed").readLines()[18].contains("uniqMapDirectory = uniqmap.GRCh38_chr21.50nt") },
{ assert path("$outputDir/transcript_identification/homer/cd4.bed").readLines()[20].contains("-uniqmap") },
{ assert path("$outputDir/transcript_identification/homer/jurkat.bed").readLines()[18].contains("uniqMapDirectory = uniqmap.GRCh38_chr21.50nt") },
{ assert path("$outputDir/transcript_identification/homer/jurkat.bed").readLines()[20].contains("-uniqmap") },
// TODO Test for uniqmap unzip process
// { assert workflow.trace.tasks().find { it.process == "UNZIP" } },
{ assert snapshot(
workflow.trace.tasks().size(),
path("$outputDir/transcript_identification/homer/cd4.bed").readLines()[18],
path("$outputDir/transcript_identification/homer/cd4.bed").readLines()[20],
path("$outputDir/transcript_identification/homer/jurkat.bed").readLines()[18],
path("$outputDir/transcript_identification/homer/jurkat.bed").readLines()[20],
path("$outputDir/transcript_identification/homer/cd4.bed"),
path("$outputDir/transcript_identification/homer/jurkat.bed"),
path("$outputDir/transcript_identification/homer/cd4-uniqmap.GRCh38_chr21.peaks.txt"),
path("$outputDir/transcript_identification/homer/jurkat-uniqmap.GRCh38_chr21.peaks.txt"),
path("$outputDir/transcript_identification/intersect/").list(),
path("$outputDir/transcript_identification/filtered/").list(),
// FIXME Not determinstic because of the order of files
// Add to the other tests when fixed
// path("$outputDir/quantification/").list(),
path("$outputDir/multiqc/multiqc_report.html").exists(),
).match("output_files")
},
)
}
}
// TODO Check for running with unzipped uniqmap
}
Loading

0 comments on commit 2d19d95

Please sign in to comment.