diff --git a/CHANGELOG.md b/CHANGELOG.md index a244978c2..5639175b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [PR #1229](https://github.com/nf-core/rnaseq/pull/1229) - Template update for nf-core/tools v2.13.1 - [PR #1231](https://github.com/nf-core/rnaseq/pull/1231) - Add sortmerna index possibilities - [PR #1234](https://github.com/nf-core/rnaseq/pull/1234) - Switch to genomecov from nf-core +- [PR #1242](https://github.com/nf-core/rnaseq/pull/1234) - Switch to dupradar from nf-core ### Parameters diff --git a/modules.json b/modules.json index b7a1250d8..8c086c900 100644 --- a/modules.json +++ b/modules.json @@ -35,6 +35,11 @@ "git_sha": "ec155021a9104441bf6a9bae3b55d1b5b0bfdb3a", "installed_by": ["modules"] }, + "dupradar": { + "branch": "master", + "git_sha": "f632a6e25b05497477920183cff33ba72ab7b6fc", + "installed_by": ["modules"] + }, "fastp": { "branch": "master", "git_sha": "003920c7f9a8ae19b69a97171922880220bedf56", diff --git a/modules/local/dupradar/main.nf b/modules/local/dupradar/main.nf deleted file mode 100644 index 9f9152d1e..000000000 --- a/modules/local/dupradar/main.nf +++ /dev/null @@ -1,48 +0,0 @@ -process DUPRADAR { - tag "$meta.id" - label 'process_long' - - conda "bioconda::bioconductor-dupradar=1.28.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bioconductor-dupradar:1.28.0--r42hdfd78af_0' : - 'biocontainers/bioconductor-dupradar:1.28.0--r42hdfd78af_0' }" - - input: - tuple val(meta), path(bam) - path gtf - - output: - tuple val(meta), path("*.pdf") , emit: pdf - tuple val(meta), path("*.txt") , emit: txt - tuple val(meta), path("*_mqc.txt"), emit: multiqc - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: // This script is bundled with the pipeline, in nf-core/rnaseq/bin/ - def prefix = task.ext.prefix ?: "${meta.id}" - - def strandedness = 0 - if (meta.strandedness == 'forward') { - strandedness = 1 - } else if (meta.strandedness == 'reverse') { - strandedness = 2 - } - def paired_end = meta.single_end ? 'single' : 'paired' - """ - dupradar.r \\ - $bam \\ - $prefix \\ - $gtf \\ - $strandedness \\ - $paired_end \\ - $task.cpus - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') - bioconductor-dupradar: \$(Rscript -e "library(dupRadar); cat(as.character(packageVersion('dupRadar')))") - END_VERSIONS - """ -} diff --git a/modules/nf-core/dupradar/environment.yml b/modules/nf-core/dupradar/environment.yml new file mode 100644 index 000000000..58b2bf11d --- /dev/null +++ b/modules/nf-core/dupradar/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "dupradar" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::bioconductor-dupradar=1.32.0" diff --git a/modules/nf-core/dupradar/main.nf b/modules/nf-core/dupradar/main.nf new file mode 100644 index 000000000..6ed502bbe --- /dev/null +++ b/modules/nf-core/dupradar/main.nf @@ -0,0 +1,45 @@ +process DUPRADAR { + tag "$meta.id" + label 'process_long' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bioconductor-dupradar:1.32.0--r43hdfd78af_0' : + 'biocontainers/bioconductor-dupradar:1.32.0--r43hdfd78af_0' }" + + input: + tuple val(meta), path(bam) + tuple val(meta2), path(gtf) + + output: + tuple val(meta), path("*_duprateExpDens.pdf") , emit: scatter2d + tuple val(meta), path("*_duprateExpBoxplot.pdf"), emit: boxplot + tuple val(meta), path("*_expressionHist.pdf") , emit: hist + tuple val(meta), path("*_dupMatrix.txt") , emit: dupmatrix + tuple val(meta), path("*_intercept_slope.txt") , emit: intercept_slope + tuple val(meta), path("*_mqc.txt") , emit: multiqc + tuple val(meta), path("*.R_sessionInfo.log") , emit: session_info + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + template 'dupradar.r' + + stub: + """ + touch ${meta.id}_duprateExpDens.pdf + touch ${meta.id}_duprateExpBoxplot.pdf + touch ${meta.id}_expressionHist.pdf + touch ${meta.id}_dupMatrix.txt + touch ${meta.id}_intercept_slope.txt + touch ${meta.id}_mqc.txt + touch ${meta.id}.R_sessionInfo.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bioconductor-dupradar: \$(Rscript -e "library(dupRadar); cat(as.character(packageVersion('dupRadar')))") + END_VERSIONS + """ +} diff --git a/modules/nf-core/dupradar/meta.yml b/modules/nf-core/dupradar/meta.yml new file mode 100644 index 000000000..95960ae98 --- /dev/null +++ b/modules/nf-core/dupradar/meta.yml @@ -0,0 +1,85 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "dupradar" +description: Assessment of duplication rates in RNA-Seq datasets +keywords: + - rnaseq + - duplication + - genomics +tools: + - "dupradar": + description: "Assessment of duplication rates in RNA-Seq datasets" + homepage: "https://bioconductor.org/packages/release/bioc/html/dupRadar.html" + documentation: "https://bioconductor.org/packages/release/bioc/vignettes/dupRadar/inst/doc/dupRadar.html" + tool_dev_url: "https://github.com/ssayols/dupRadar" + doi: "10.1186/s12859-016-1276-2" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/SAM file containing read alignments + pattern: "*.{bam}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'human' ] + - gtf: + type: file + description: Genomic features annotation in GTF or SAF + pattern: "*.{gtf}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - scatter2d: + type: file + description: PDF duplication rate against total read count plot + pattern: "*_duprateExpDens.pdf" + - boxplot: + type: file + description: | + PDF duplication rate ~ total reads per kilobase (RPK) boxplot + pattern: "*_duprateExpBoxplot.pdf" + - hist: + type: file + description: | + PDF expression histogram + pattern: "*.pdf" + - dupmatrix: + type: file + description: | + Text file containing tags falling on the features described in the GTF + file + pattern: "*_dupMatrix.txt" + - intercept_slope: + type: file + description: | + Text file containing intercept and slope from dupRadar modelling + pattern: "*_intercept_slope.txt" + - multiqc: + type: file + description: | + dupRadar files for passing to MultiQC + pattern: "*_multiqc.txt" + - session_info: + type: file + description: dump of R SessionInfo + pattern: "*.log" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@pinin4fjords" +maintainers: + - "@pinin4fjords" diff --git a/modules/local/dupradar/nextflow.config b/modules/nf-core/dupradar/nextflow.config similarity index 100% rename from modules/local/dupradar/nextflow.config rename to modules/nf-core/dupradar/nextflow.config diff --git a/bin/dupradar.r b/modules/nf-core/dupradar/templates/dupradar.r similarity index 51% rename from bin/dupradar.r rename to modules/nf-core/dupradar/templates/dupradar.r index 00119f550..ec20cb851 100755 --- a/bin/dupradar.r +++ b/modules/nf-core/dupradar/templates/dupradar.r @@ -1,50 +1,65 @@ #!/usr/bin/env Rscript # Written by Phil Ewels and released under the MIT license. +# Ported to nf-core/modules with template by Jonathan Manning -# Command line argument processing -args = commandArgs(trailingOnly=TRUE) -if (length(args) < 5) { - stop("Usage: dupRadar.r ", call.=FALSE) +#' Parse out options from a string without recourse to optparse +#' +#' @param x Long-form argument list like --opt1 val1 --opt2 val2 +#' +#' @return named list of options and values similar to optparse + +parse_args <- function(x){ + args_list <- unlist(strsplit(x, ' ?--')[[1]])[-1] + args_vals <- lapply(args_list, function(x) scan(text=x, what='character', quiet = TRUE)) + + # Ensure the option vectors are length 2 (key/ value) to catch empty ones + args_vals <- lapply(args_vals, function(z){ length(z) <- 2; z}) + + parsed_args <- structure(lapply(args_vals, function(x) x[2]), names = lapply(args_vals, function(x) x[1])) + parsed_args[! is.na(parsed_args)] } -input_bam <- args[1] -output_prefix <- args[2] -annotation_gtf <- args[3] -stranded <- as.numeric(args[4]) -paired_end <- if(args[5]=='paired') TRUE else FALSE -threads <- as.numeric(args[6]) -bamRegex <- "(.+)\\.bam$" +################################################ +################################################ +## Pull in module inputs ## +################################################ +################################################ + +input_bam <- '$bam' +output_prefix = ifelse('$task.ext.prefix' == 'null', '$meta.id', '$task.ext.prefix') +annotation_gtf <- '$gtf' +threads <- $task.cpus +args_opt <- parse_args('$task.ext.args') +feature_type <- ifelse('feature_type' %in% names(args_opt), args_opt[['feature_type']], 'exon') + +stranded <- 0 +if ('${meta.strandedness}' == 'forward') { + stranded <- 1 +} else if ('${meta.strandedness}' == 'reverse') { + stranded <- 2 +} -if(!(grepl(bamRegex, input_bam) && file.exists(input_bam) && (!file.info(input_bam)$isdir))) stop("First argument '' must be an existing file (not a directory) with '.bam' extension...") -if(!(file.exists(annotation_gtf) && (!file.info(annotation_gtf)$isdir))) stop("Second argument '' must be an existing file (and not a directory)...") -if(is.na(stranded) || (!(stranded %in% (0:2)))) stop("Third argument must be a numeric value in 0(unstranded)/1(forward)/2(reverse)...") -if(is.na(threads) || (threads<=0)) stop("Fifth argument must be a strictly positive numeric value...") +paired_end <- TRUE +if ('${meta.single_end}' == 'true'){ + paired_end <- FALSE +} # Debug messages (stderr) -message("Input bam (Arg 1): ", input_bam) -message("Input gtf (Arg 2): ", annotation_gtf) -message("Strandness (Arg 3): ", c("unstranded", "forward", "reverse")[stranded+1]) -message("paired/single (Arg 4): ", ifelse(paired_end, 'paired', 'single')) -message("Nb threads (Arg 5): ", threads) -message("R package loc. (Arg 6): ", ifelse(length(args) > 4, args[5], "Not specified")) -message("Output basename : ", output_prefix) - +message("Input bam : ", input_bam) +message("Input gtf : ", annotation_gtf) +message("Strandness : ", c("unstranded", "forward", "reverse")[stranded+1]) +message("paired/single : ", ifelse(paired_end, 'paired', 'single')) +message("feature type : ", ifelse(paired_end, 'paired', 'single')) +message("Nb threads : ", threads) +message("Output basename: ", output_prefix) # Load / install packages -if (length(args) > 5) { .libPaths( c( args[6], .libPaths() ) ) } -if (!require("dupRadar")){ - source("http://bioconductor.org/biocLite.R") - biocLite("dupRadar", suppressUpdates=TRUE) - library("dupRadar") -} -if (!require("parallel")) { - install.packages("parallel", dependencies=TRUE, repos='http://cloud.r-project.org/') - library("parallel") -} +library("dupRadar") +library("parallel") # Duplicate stats -dm <- analyzeDuprates(input_bam, annotation_gtf, stranded, paired_end, threads) +dm <- analyzeDuprates(input_bam, annotation_gtf, stranded, paired_end, threads, GTF.featureType = feature_type, verbose = TRUE) write.table(dm, file=paste(output_prefix, "_dupMatrix.txt", sep=""), quote=F, row.name=F, sep="\t") # 2D density scatter plot @@ -55,8 +70,8 @@ mtext(output_prefix, side=3) dev.off() fit <- duprateExpFit(DupMat=dm) cat( - paste("- dupRadar Int (duprate at low read counts):", fit$intercept), - paste("- dupRadar Sl (progression of the duplication rate):", fit$slope), + paste("- dupRadar Int (duprate at low read counts):", fit\$intercept), + paste("- dupRadar Sl (progression of the duplication rate):", fit\$slope), fill=TRUE, labels=output_prefix, file=paste0(output_prefix, "_intercept_slope.txt"), append=FALSE ) @@ -77,11 +92,11 @@ line="#id: DupInt Sample dupRadar_intercept" write(line,file=paste0(output_prefix, "_dup_intercept_mqc.txt"),append=TRUE) -write(paste(sample_name, fit$intercept),file=paste0(output_prefix, "_dup_intercept_mqc.txt"),append=TRUE) +write(paste(sample_name, fit\$intercept),file=paste0(output_prefix, "_dup_intercept_mqc.txt"),append=TRUE) # Get numbers from dupRadar GLM -curve_x <- sort(log10(dm$RPK)) -curve_y = 100*predict(fit$glm, data.frame(x=curve_x), type="response") +curve_x <- sort(log10(dm\$RPK)) +curve_y = 100*predict(fit\$glm, data.frame(x=curve_x), type="response") # Remove all of the infinite values infs = which(curve_x %in% c(-Inf,Inf)) curve_x = curve_x[-infs] @@ -147,7 +162,33 @@ title("Distribution of RPK values per gene") mtext(output_prefix, side=3) dev.off() -# Print sessioninfo to standard out -print(output_prefix) -citation("dupRadar") -sessionInfo() +################################################ +################################################ +## R SESSION INFO ## +################################################ +################################################ + +sink(paste(output_prefix, "R_sessionInfo.log", sep = '.')) +print(sessionInfo()) +sink() + +################################################ +################################################ +## VERSIONS FILE ## +################################################ +################################################ + +r.version <- strsplit(version[['version.string']], ' ')[[1]][3] +dupradar.version <- as.character(packageVersion('dupRadar')) + +writeLines( + c( + '"${task.process}":', + paste(' bioconductor-dupradar:', dupradar.version) + ), +'versions.yml') + +################################################ +################################################ +################################################ +################################################ diff --git a/modules/nf-core/dupradar/tests/main.nf.test b/modules/nf-core/dupradar/tests/main.nf.test new file mode 100644 index 000000000..f7f0933c8 --- /dev/null +++ b/modules/nf-core/dupradar/tests/main.nf.test @@ -0,0 +1,148 @@ +nextflow_process { + + name "Test Process DUPRADAR" + script "../main.nf" + process "DUPRADAR" + + tag "modules" + tag "modules_nfcore" + tag "dupradar" + + test("sarscov2 - bam - single_end") { + + config './nextflow.config' + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true, strandedness:'forward' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.single_end.bam", checkIfExists: true) + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.scatter2d[0][1]).name).match('scatter_single_end') }, + { assert snapshot(file(process.out.boxplot[0][1]).name).match('boxplot_single_end') }, + { assert snapshot(file(process.out.hist[0][1]).name).match('hist_single_end') }, + { assert snapshot(process.out.dupmatrix).match('dupmatrix_single_end') }, + { assert snapshot(process.out.intercept_slopt).match('intercept_slope_single_end') }, + { assert snapshot(process.out.multiqc).match('multiqc_single_end') }, + { assert snapshot(process.out.versions).match('versions_single_end') } + ) + } + + } + + test("sarscov2 - bam - single_end - stub") { + + config './nextflow.config' + + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true, strandedness:'forward' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.single_end.bam", checkIfExists: true) + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.scatter2d[0][1]).name).match('scatter_single_end_stub') }, + { assert snapshot(file(process.out.boxplot[0][1]).name).match('boxplot_single_end_stub') }, + { assert snapshot(file(process.out.hist[0][1]).name).match('hist_single_end_stub') }, + { assert snapshot(process.out.dupmatrix).match('dupmatrix_single_end_stub') }, + { assert snapshot(process.out.intercept_slopt).match('intercept_slope_single_end_stub') }, + { assert snapshot(process.out.multiqc).match('multiqc_single_end_stub') }, + { assert snapshot(process.out.versions).match('versions_single_end_stub') } + ) + } + + } + + test("sarscov2 - bam - paired_end") { + + config './nextflow.config' + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false, strandedness:'forward' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.bam", checkIfExists: true) + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.scatter2d[0][1]).name).match('scatter_paired_end') }, + { assert snapshot(file(process.out.boxplot[0][1]).name).match('boxplot_paired_end') }, + { assert snapshot(file(process.out.hist[0][1]).name).match('hist_paired_end') }, + { assert snapshot(process.out.dupmatrix).match('dupmatrix_paired_end') }, + { assert snapshot(process.out.intercept_slopt).match('intercept_slope_paired_end') }, + { assert snapshot(process.out.multiqc).match('multiqc_paired_end') }, + { assert snapshot(process.out.versions).match('versions_paired_end') } + ) + } + } + + test("sarscov2 - bam - paired_end - stub") { + + config './nextflow.config' + + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false, strandedness:'forward' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.bam", checkIfExists: true) + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.scatter2d[0][1]).name).match('scatter_paired_end_stub') }, + { assert snapshot(file(process.out.boxplot[0][1]).name).match('boxplot_paired_end_stub') }, + { assert snapshot(file(process.out.hist[0][1]).name).match('hist_paired_end_stub') }, + { assert snapshot(process.out.dupmatrix).match('dupmatrix_paired_end_stub') }, + { assert snapshot(process.out.intercept_slopt).match('intercept_slope_paired_end_stub') }, + { assert snapshot(process.out.multiqc).match('multiqc_paired_end_stub') }, + { assert snapshot(process.out.versions).match('versions_paired_end_stub') } + ) + } + } +} diff --git a/modules/nf-core/dupradar/tests/main.nf.test.snap b/modules/nf-core/dupradar/tests/main.nf.test.snap new file mode 100644 index 000000000..e64aa7298 --- /dev/null +++ b/modules/nf-core/dupradar/tests/main.nf.test.snap @@ -0,0 +1,360 @@ +{ + "boxplot_single_end": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.021785925" + }, + "multiqc_single_end_stub": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true, + "strandedness": "forward" + }, + "test_mqc.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.36647107" + }, + "versions_paired_end_stub": { + "content": [ + [ + "versions.yml:md5,cd524e9e74304c2930cf28e2d741d351" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.545356706" + }, + "multiqc_paired_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false, + "strandedness": "forward" + }, + [ + "test_dup_intercept_mqc.txt:md5,d69369924aeb9695b0e97e755e0d9ea3", + "test_duprateExpDensCurve_mqc.txt:md5,f4a50dc09de81219ed4449c11153ba6e" + ] + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.730550241" + }, + "boxplot_paired_end_stub": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.512885589" + }, + "scatter_single_end": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.010955775" + }, + "hist_single_end_stub": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.353498911" + }, + "scatter_paired_end_stub": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.507974569" + }, + "dupmatrix_single_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true, + "strandedness": "forward" + }, + "test_dupMatrix.txt:md5,2beda4c140548a2b8c91bf6bde01ddc6" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.027798024" + }, + "dupmatrix_single_end_stub": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true, + "strandedness": "forward" + }, + "test_dupMatrix.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.358373221" + }, + "multiqc_single_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true, + "strandedness": "forward" + }, + [ + "test_dup_intercept_mqc.txt:md5,7b6fb70cbede0d20ffa576a0cc0b249d", + "test_duprateExpDensCurve_mqc.txt:md5,49b44937123c14b622f346cb6156dd4f" + ] + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.036463063" + }, + "versions_single_end": { + "content": [ + [ + "versions.yml:md5,cd524e9e74304c2930cf28e2d741d351" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.043006923" + }, + "multiqc_paired_end_stub": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false, + "strandedness": "forward" + }, + "test_mqc.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.537047876" + }, + "dupmatrix_paired_end_stub": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false, + "strandedness": "forward" + }, + "test_dupMatrix.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.527609018" + }, + "boxplot_paired_end": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.709324683" + }, + "hist_paired_end": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.713514333" + }, + "versions_paired_end": { + "content": [ + [ + "versions.yml:md5,cd524e9e74304c2930cf28e2d741d351" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.737814831" + }, + "versions_single_end_stub": { + "content": [ + [ + "versions.yml:md5,cd524e9e74304c2930cf28e2d741d351" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.372024419" + }, + "hist_single_end": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.024192244" + }, + "boxplot_single_end_stub": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.349385822" + }, + "intercept_slope_paired_end": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.723431072" + }, + "intercept_slope_single_end_stub": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.36234388" + }, + "intercept_slope_paired_end_stub": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.532566607" + }, + "hist_paired_end_stub": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:08:05.518776728" + }, + "scatter_paired_end": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.703114124" + }, + "dupmatrix_paired_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false, + "strandedness": "forward" + }, + "test_dupMatrix.txt:md5,5a327feaba56e5ea96a2cb7e8577e196" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:55.717362643" + }, + "intercept_slope_single_end": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:33.033103464" + }, + "scatter_single_end_stub": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T13:07:43.344100132" + } +} \ No newline at end of file diff --git a/modules/nf-core/dupradar/tests/nextflow.config b/modules/nf-core/dupradar/tests/nextflow.config new file mode 100644 index 000000000..1b44170a0 --- /dev/null +++ b/modules/nf-core/dupradar/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: DUPRADAR { + ext.args = { "--feature_type CDS" } + } + +} diff --git a/modules/nf-core/dupradar/tests/tags.yml b/modules/nf-core/dupradar/tests/tags.yml new file mode 100644 index 000000000..255dc4ef3 --- /dev/null +++ b/modules/nf-core/dupradar/tests/tags.yml @@ -0,0 +1,2 @@ +dupradar: + - "modules/nf-core/dupradar/**" diff --git a/workflows/rnaseq/main.nf b/workflows/rnaseq/main.nf index 224597826..962b1a906 100755 --- a/workflows/rnaseq/main.nf +++ b/workflows/rnaseq/main.nf @@ -10,7 +10,6 @@ include { DESEQ2_QC as DESEQ2_QC_STAR_SALMON } from '../../modules/local/deseq2_qc' include { DESEQ2_QC as DESEQ2_QC_RSEM } from '../../modules/local/deseq2_qc' include { DESEQ2_QC as DESEQ2_QC_PSEUDO } from '../../modules/local/deseq2_qc' -include { DUPRADAR } from '../../modules/local/dupradar' include { MULTIQC_CUSTOM_BIOTYPE } from '../../modules/local/multiqc_custom_biotype' // @@ -41,6 +40,7 @@ include { CAT_FASTQ } from '../../mod include { BEDTOOLS_GENOMECOV as BEDTOOLS_GENOMECOV_FW } from '../../modules/nf-core/bedtools/genomecov' include { BEDTOOLS_GENOMECOV as BEDTOOLS_GENOMECOV_REV } from '../../modules/nf-core/bedtools/genomecov' include { BBMAP_BBSPLIT } from '../../modules/nf-core/bbmap/bbsplit' +include { DUPRADAR } from '../../modules/nf-core/dupradar' include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort' include { PRESEQ_LCEXTRAP } from '../../modules/nf-core/preseq/lcextrap' include { QUALIMAP_RNASEQ } from '../../modules/nf-core/qualimap/rnaseq' @@ -685,7 +685,7 @@ workflow RNASEQ { if (!params.skip_dupradar) { DUPRADAR ( ch_genome_bam, - ch_gtf + ch_gtf.map { [ [:], it ] } ) ch_multiqc_files = ch_multiqc_files.mix(DUPRADAR.out.multiqc.collect{it[1]}) ch_versions = ch_versions.mix(DUPRADAR.out.versions.first()) diff --git a/workflows/rnaseq/nextflow.config b/workflows/rnaseq/nextflow.config index 5ec9c97b9..8e06b8211 100644 --- a/workflows/rnaseq/nextflow.config +++ b/workflows/rnaseq/nextflow.config @@ -1,8 +1,8 @@ -includeConfig "../../modules/local/dupradar/nextflow.config" includeConfig "../../modules/local/multiqc_custom_biotype/nextflow.config" includeConfig "../../modules/nf-core/bbmap/bbsplit/nextflow.config" includeConfig "../../modules/nf-core/bedtools/genomecov/nextflow.config" includeConfig "../../modules/nf-core/cat/fastq/nextflow.config" +includeConfig "../../modules/nf-core/dupradar/nextflow.config" includeConfig "../../modules/nf-core/multiqc/nextflow.config" includeConfig "../../modules/nf-core/preseq/lcextrap/nextflow.config" includeConfig "../../modules/nf-core/qualimap/rnaseq/nextflow.config"