Skip to content

Commit

Permalink
test(#57): Add uniqmap test
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Dec 21, 2024
1 parent bb5a3a8 commit 33fd8f0
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 0 deletions.
52 changes: 52 additions & 0 deletions workflows/tests/inputs/uniqmap/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
nextflow_pipeline {

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

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

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(UTILS.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
}
125 changes: 125 additions & 0 deletions workflows/tests/inputs/uniqmap/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"output_files": {
"content": [
93,
"# uniqMapDirectory = uniqmap.GRCh38_chr21.50nt",
"# cmd = findPeaks cd4_tagdir -style groseq -o cd4-uniqmap.GRCh38_chr21.peaks.txt -uniqmap uniqmap.GRCh38_chr21.50nt",
"# uniqMapDirectory = uniqmap.GRCh38_chr21.50nt",
"# cmd = findPeaks jurkat_tagdir -style groseq -o jurkat-uniqmap.GRCh38_chr21.peaks.txt -uniqmap uniqmap.GRCh38_chr21.50nt",
"cd4.bed:md5,bbe77431f7c1ac833d1f939012435962",
"jurkat.bed:md5,98dd0b5dde7b11c0604b35c391754c9d",
"cd4-uniqmap.GRCh38_chr21.peaks.txt:md5,bbe77431f7c1ac833d1f939012435962",
"jurkat-uniqmap.GRCh38_chr21.peaks.txt:md5,98dd0b5dde7b11c0604b35c391754c9d",
[
"cd4_intersect.bed:md5,a5d31a685d89293ae64daff9a9054568",
"jurkat_intersect.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
],
[
"cd4_filtered.bed:md5,fe48a92889bc118c41e436989f85c65e",
"jurkat_filtered.bed:md5,f1dde43c4ad9dec972ff9fa38cc6f2fe"
],
true
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.1"
},
"timestamp": "2024-11-26T14:08:33.633789"
},
"software_versions": {
"content": [
{
"BBMAP_PILEUP": {
"bbmap": 39.01,
"samtools": "1.16.1",
"pigz": 2.6
},
"BEDTOOLS_GENOMECOV_MINUS": {
"bedtools": "2.31.1"
},
"BEDTOOLS_GENOMECOV_PLUS": {
"bedtools": "2.31.1"
},
"BEDTOOLS_INTERSECT": {
"bedtools": "2.31.1"
},
"BEDTOOLS_INTERSECT_FILTER": {
"bedtools": "2.31.1"
},
"BEDTOOLS_MERGE": {
"bedtools": "2.31.1"
},
"BEDTOOLS_SORT": {
"bedtools": "2.31.1"
},
"BWA_INDEX": {
"bwa": "0.7.18-r1243-dirty"
},
"BWA_MEM": {
"bwa": "0.7.18-r1243-dirty",
"samtools": 1.2
},
"CAT_CAT": {
"pigz": "2.3.4"
},
"CUSTOM_GETCHROMSIZES": {
"getchromsizes": 1.2
},
"DEEPTOOLS_BAMCOVERAGE_MINUS": {
"deeptools": "3.5.1"
},
"DEEPTOOLS_BAMCOVERAGE_PLUS": {
"deeptools": "3.5.1"
},
"FASTP": {
"fastp": "0.23.4"
},
"FASTQC": {
"fastqc": "0.12.1"
},
"GTF2BED": {
"perl": "5.26.2"
},
"PINTS_CALLER": {
"python": "3.12.6",
"pints": "1.1.13"
},
"PRESEQ_CCURVE": {
"preseq": "3.1.1"
},
"PRESEQ_LCEXTRAP": {
"preseq": "3.1.1"
},
"RSEQC_INFEREXPERIMENT": {
"rseqc": "5.0.2"
},
"RSEQC_READDISTRIBUTION": {
"rseqc": "5.0.2"
},
"RSEQC_READDUPLICATION": {
"rseqc": "5.0.2"
},
"SAMTOOLS_MERGE": {
"samtools": 1.21
},
"SUBREAD_FEATURECOUNTS_GENE": {
"subread": "2.0.1"
},
"SUBREAD_FEATURECOUNTS_PREDICTED": {
"subread": "2.0.1"
},
"UNZIP": {
"7za": 16.02
},
"Workflow": {
"nf-core/nascent": "v2.3.0dev"
}
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.1"
},
"timestamp": "2024-11-26T10:49:29.60087"
}
}

0 comments on commit 33fd8f0

Please sign in to comment.