diff --git a/modules/jacusa2.nf b/modules/jacusa2.nf index e789f87..2968e15 100644 --- a/modules/jacusa2.nf +++ b/modules/jacusa2.nf @@ -8,12 +8,14 @@ process jacusa2 { tuple(path(genome), path(fastaindex)) output: - path("*.txt") + path("*.site_edits_jacusa2.txt") path("*.filtered") // tuple(sample, path("filtered_output.txt", emit: tuple_sample_jacusa2_table)) script: + base_name = bam.BaseName + """ - java -Xmx${task.memory.toMega()}M -jar /usr/local/bin/JACUSA_v2.0.4.jar call-1 -a D -f V -p ${task.cpus} -r jacusa_out.txt -c 1 -s -R ${genome} ${bam} + java -Xmx${task.memory.toMega()}M -jar /usr/local/bin/JACUSA_v2.0.4.jar call-1 -a D -f V -p ${task.cpus} -r ${base_name}.site_edits_jacusa2.txt -c 1 -s -R ${genome} ${bam} """ } \ No newline at end of file diff --git a/modules/pluviometer.nf b/modules/pluviometer.nf index 5bf8edb..a88404f 100644 --- a/modules/pluviometer.nf +++ b/modules/pluviometer.nf @@ -9,10 +9,11 @@ process pluviometer { val(tool_format) output: - tuple(val(meta), path("feature_edits.tsv"), emit: tuple_sample_feature_edits) + tuple(val(meta), path("*.feature_edits.tsv"), emit: tuple_sample_feature_edits) script: + base_name = site_edits.BaseName """ # cp ${workflow.projectDir}/bin/stats/*.py ./ python ${workflow.projectDir}/bin/stats/pluviometer.py \ @@ -22,6 +23,6 @@ process pluviometer { --cov 1 \ --edit_threshold ${params.edit_threshold} \ --aggregation_mode ${params.aggregation_mode} \ - --output feature_edits.tsv + --output ${base_name}.feature_edits.tsv """ } \ No newline at end of file diff --git a/modules/reditools2.nf b/modules/reditools2.nf index e3b19b8..2ed7f13 100644 --- a/modules/reditools2.nf +++ b/modules/reditools2.nf @@ -1,6 +1,6 @@ process reditools2 { label "reditools2" - publishDir("${params.outdir}/reditools", mode: "copy") + publishDir("${params.outdir}/reditools2", mode: "copy") tag "${meta.id}" input: @@ -9,7 +9,7 @@ process reditools2 { val region output: - tuple(val(meta), path("edit_table.txt"), emit: tuple_sample_serial_table) + tuple(val(meta), path("*site_edits_reditools2.txt"), emit: tuple_sample_serial_table) script: @@ -29,8 +29,9 @@ process reditools2 { // the reditools error message strand_orientation = meta.libtype } + base_name = bam.BaseName """ - reditools.py -f ${bam} -r ${genome} -s ${strand_orientation} -o edit_table.txt + reditools.py -f ${bam} -r ${genome} -s ${strand_orientation} -o ${base_name}.site_edits_reditools2.txt """ } diff --git a/modules/sapin.nf b/modules/sapin.nf index fe9f57a..dfefe37 100644 --- a/modules/sapin.nf +++ b/modules/sapin.nf @@ -8,10 +8,11 @@ process sapin { path(reference) output: - path("restable.tsv") + path("*.site_edits_sapin.tsv") script: + base_name = bam.BaseName """ - sapin -a ${bam} -f ${reference} > restable.tsv + sapin -a ${bam} -f ${reference} > ${base_name}.site_edits_sapin.tsv """ }