diff --git a/modules.json b/modules.json index b7a1250d8..4f22e32b8 100644 --- a/modules.json +++ b/modules.json @@ -35,6 +35,11 @@ "git_sha": "ec155021a9104441bf6a9bae3b55d1b5b0bfdb3a", "installed_by": ["modules"] }, + "dupradar": { + "branch": "dupradar", + "git_sha": "a9e8634e277e6fc381ffa1430717db5c54d9776e", + "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..9e7157faf --- /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}": + r: \$( R --version | sed '1!d; s/.*version //; s/ .*//' ) + 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/modules/nf-core/dupradar/templates/dupradar.r b/modules/nf-core/dupradar/templates/dupradar.r new file mode 100755 index 000000000..ec20cb851 --- /dev/null +++ b/modules/nf-core/dupradar/templates/dupradar.r @@ -0,0 +1,194 @@ +#!/usr/bin/env Rscript + +# Written by Phil Ewels and released under the MIT license. +# Ported to nf-core/modules with template by Jonathan Manning + +#' 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)] +} + +################################################ +################################################ +## 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 +} + +paired_end <- TRUE +if ('${meta.single_end}' == 'true'){ + paired_end <- FALSE +} + +# Debug messages (stderr) +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 +library("dupRadar") +library("parallel") + +# Duplicate stats +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 +pdf(paste0(output_prefix, "_duprateExpDens.pdf")) +duprateExpDensPlot(DupMat=dm) +title("Density scatter plot") +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), + fill=TRUE, labels=output_prefix, + file=paste0(output_prefix, "_intercept_slope.txt"), append=FALSE +) + +# Create a multiqc file dupInt +sample_name <- gsub("Aligned.sortedByCoord.out.markDups", "", output_prefix) +line="#id: DupInt +#plot_type: 'generalstats' +#pconfig: +# dupRadar_intercept: +# title: 'dupInt' +# namespace: 'DupRadar' +# description: 'Intercept value from DupRadar' +# max: 100 +# min: 0 +# scale: 'RdYlGn-rev' +# format: '{:.2f}%' +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) + +# Get numbers from dupRadar GLM +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] +curve_y = curve_y[-infs] +# Reduce number of data points +curve_x <- curve_x[seq(1, length(curve_x), 10)] +curve_y <- curve_y[seq(1, length(curve_y), 10)] +# Convert x values back to real counts +curve_x = 10^curve_x +# Write to file +line="#id: dupradar +#plot_type: 'linegraph' +#section_name: 'DupRadar' +#section_href: 'bioconductor.org/packages/release/bioc/html/dupRadar.html' +#description: \"provides duplication rate quality control for RNA-Seq datasets. Highly expressed genes can be expected to have a lot of duplicate reads, but high numbers of duplicates at low read counts can indicate low library complexity with technical duplication. +# This plot shows the general linear models - a summary of the gene duplication distributions. \" +#pconfig: +# title: 'DupRadar General Linear Model' +# xLog: True +# xlab: 'expression (reads/kbp)' +# ylab: '% duplicate reads' +# ymax: 100 +# ymin: 0 +# tt_label: '{point.x:.1f} reads/kbp: {point.y:,.2f}% duplicates' +# xPlotLines: +# - color: 'green' +# dashStyle: 'LongDash' +# label: +# style: {color: 'green'} +# text: '0.5 RPKM' +# verticalAlign: 'bottom' +# y: -65 +# value: 0.5 +# width: 1 +# - color: 'red' +# dashStyle: 'LongDash' +# label: +# style: {color: 'red'} +# text: '1 read/bp' +# verticalAlign: 'bottom' +# y: -65 +# value: 1000 +# width: 1" + +write(line,file=paste0(output_prefix, "_duprateExpDensCurve_mqc.txt"),append=TRUE) +write.table( + cbind(curve_x, curve_y), + file=paste0(output_prefix, "_duprateExpDensCurve_mqc.txt"), + quote=FALSE, row.names=FALSE, col.names=FALSE, append=TRUE, +) + +# Distribution of expression box plot +pdf(paste0(output_prefix, "_duprateExpBoxplot.pdf")) +duprateExpBoxplot(DupMat=dm) +title("Percent Duplication by Expression") +mtext(output_prefix, side=3) +dev.off() + +# Distribution of RPK values per gene +pdf(paste0(output_prefix, "_expressionHist.pdf")) +expressionHist(DupMat=dm) +title("Distribution of RPK values per gene") +mtext(output_prefix, side=3) +dev.off() + +################################################ +################################################ +## 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..91d146f79 --- /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-07T12:49:21.922039" + }, + "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-07T12:49:31.357222" + }, + "versions_paired_end_stub": { + "content": [ + [ + "versions.yml:md5,f952f507e96ca240a0001d474b78482c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:51.574571" + }, + "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-07T12:49:42.461093" + }, + "boxplot_paired_end_stub": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:51.559905" + }, + "scatter_single_end": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:21.918598" + }, + "hist_single_end_stub": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:31.348502" + }, + "scatter_paired_end_stub": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:51.556467" + }, + "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-07T12:49:21.924059" + }, + "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-07T12:49:31.351859" + }, + "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-07T12:49:21.928419" + }, + "versions_single_end": { + "content": [ + [ + "versions.yml:md5,cd524e9e74304c2930cf28e2d741d351" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:21.932714" + }, + "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-07T12:49:51.571145" + }, + "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-07T12:49:51.565731" + }, + "boxplot_paired_end": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:42.443805" + }, + "hist_paired_end": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:42.447054" + }, + "versions_paired_end": { + "content": [ + [ + "versions.yml:md5,cd524e9e74304c2930cf28e2d741d351" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:42.464002" + }, + "versions_single_end_stub": { + "content": [ + [ + "versions.yml:md5,f952f507e96ca240a0001d474b78482c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:31.360295" + }, + "hist_single_end": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:21.923108" + }, + "boxplot_single_end_stub": { + "content": [ + "test_duprateExpBoxplot.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:31.345725" + }, + "intercept_slope_paired_end": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:42.45859" + }, + "intercept_slope_single_end_stub": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:31.35476" + }, + "intercept_slope_paired_end_stub": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:51.568373" + }, + "hist_paired_end_stub": { + "content": [ + "test_expressionHist.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:51.562908" + }, + "scatter_paired_end": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:42.44031" + }, + "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-07T12:49:42.456012" + }, + "intercept_slope_single_end": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:21.926193" + }, + "scatter_single_end_stub": { + "content": [ + "test_duprateExpDens.pdf" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-07T12:49:31.342456" + } +} \ 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())