Skip to content

Commit

Permalink
add bwameth run_qualimap test
Browse files Browse the repository at this point in the history
  • Loading branch information
sateeshperi committed Dec 2, 2024
1 parent d6917c3 commit 754065d
Show file tree
Hide file tree
Showing 4 changed files with 631 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/.nftignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ multiqc/{bismark,bismark_hisat,bwameth}/multiqc_data/multiqc_sources.txt
multiqc/{bismark,bismark_hisat,bwameth}/multiqc_report.html
multiqc/{bismark,bismark_hisat,bwameth}/multiqc_plots/{pdf,png,svg}/*.{pdf,png,svg}
pipeline_info/*.{html,json,txt,yml}
qualimap/**/qualimapReport.html
{bismark,bismark_hisat,bwameth}/qualimap/bamqc/*/qualimapReport.html
qualimap/**/css/*
qualimap/**/images_qualimapReport/*
qualimap/**/raw_data_qualimapReport/*
Expand Down
8 changes: 2 additions & 6 deletions tests/bismark_run_qualimap.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@
"genome_mapping_quality_histogram.png:md5,74776b1e7e8c8876af1cf89d9dbb5f31",
"genome_reads_content_per_read_position.png:md5,c6920dc357411880132c207c7d0aa68d",
"genome_uniq_read_starts_histogram.png:md5,8f7549a63eee3d3f022699aaa5bb858d",
"qualimapReport.html:md5,bbc015c0d1f3c41a08c82fb7a6839039",
"coverage_across_reference.txt:md5,2bb9eb828acfd71ace8f1e6a2ca124b4",
"coverage_histogram.txt:md5,6ee761660a6072e5b6b75b7fe8d2c69e",
"duplication_rate_histogram.txt:md5,d5f25ad3572b98880b6904dcf4b3ed25",
Expand Down Expand Up @@ -601,7 +600,6 @@
"genome_mapping_quality_histogram.png:md5,7ba0db9375d09fd49946b9bca4ba92b4",
"genome_reads_content_per_read_position.png:md5,1a6a7717ea948d2518808f72f58ffdef",
"genome_uniq_read_starts_histogram.png:md5,395413ab1d0e10af72b116fd8cb12685",
"qualimapReport.html:md5,1fe626f663d66a7ce0c6e1e0207d829d",
"coverage_across_reference.txt:md5,081ddc3be3349b0c57d9676c03d84803",
"coverage_histogram.txt:md5,47b75803a6925e883e254bb91d6220d2",
"duplication_rate_histogram.txt:md5,3d06b34e40d1fdeb55c4ad19dc6ddad1",
Expand Down Expand Up @@ -643,7 +641,6 @@
"genome_mapping_quality_histogram.png:md5,017451f46bc875ac58e7906bf7979956",
"genome_reads_content_per_read_position.png:md5,fd94ec5bfe5ca4adfa6ebdeaebe25157",
"genome_uniq_read_starts_histogram.png:md5,2f2555ef88c3bda05315469e684f5b19",
"qualimapReport.html:md5,af640b29bd28f80bdc0ab6fe7d9c97f4",
"coverage_across_reference.txt:md5,a76b3da0ebb2f8bd6c36ec1902cf13f2",
"coverage_histogram.txt:md5,ca854c05e9619233b7d95d44051cab80",
"duplication_rate_histogram.txt:md5,530bb05c648d610227e121e1e74f41f8",
Expand Down Expand Up @@ -685,7 +682,6 @@
"genome_mapping_quality_histogram.png:md5,a22ee10fcb9e34a84f607b089855fb92",
"genome_reads_content_per_read_position.png:md5,9fa406f353148448f6b9ac11880bc6de",
"genome_uniq_read_starts_histogram.png:md5,cf2fe3e30e11e7d6eb2db679cd12dc03",
"qualimapReport.html:md5,c8114fbb2a63da68111f0d4cbb8a1973",
"coverage_across_reference.txt:md5,fb9c989fc6c15d0a8fd0a58b8d3c20ce",
"coverage_histogram.txt:md5,8a3f45461442657433914c6a5ecb1301",
"duplication_rate_histogram.txt:md5,ec9a705fd3a300b126d556afa14c326b",
Expand Down Expand Up @@ -752,6 +748,6 @@
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-11-28T09:47:26.992492832"
"timestamp": "2024-12-02T12:34:53.964190449"
}
}
}
42 changes: 42 additions & 0 deletions tests/bwameth_run_qualimap.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
nextflow_pipeline {

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

test("Params: bwameth | run_qualimap") {
when {
params {
aligner = "bwameth"
outdir = "$outputDir"
run_qualimap = 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() }
)
}
}

}
Loading

0 comments on commit 754065d

Please sign in to comment.