@@ -56,31 +56,25 @@ process TRANSCRIPTCLEAN {
5656 tuple val(meta), path(sam), path(fasta), path(vcf), path(splice_junctions), val(params)
5757
5858 output:
59- tuple val(meta), path(" *_TranscriptClean .sam" ), emit: sam
60- tuple val(meta), path(" *_TranscriptClean .fasta" ), emit: fasta
61- tuple val(meta), path(" *_TranscriptClean .TE.log" ), emit: log
62- tuple val(meta), path(" *_TranscriptClean .log" ), emit: log
59+ tuple val(meta), path(" *.sam" ), emit: sam
60+ tuple val(meta), path(" *.fasta" ), emit: fasta
61+ tuple val(meta), path(" *.TE.log" ), emit: log
62+ tuple val(meta), path(" *.log" ), emit: log
6363 path " versions.yml" , emit: versions
6464
65- when:
66- params. variant_aware || params. splice_junction_correction
67-
6865 script:
6966 args = task. ext. args ?: ' '
7067 prefix = task. ext. prefix ?: " ${ meta.id} "
7168 def variant_flag = params. variant_aware && vcf ? " --variants ${ vcf} " : ' '
72- def splice_flag = params. splice_junction_correction && splice_junctions ? " --spliceJns ${ splice_junctions} " : ' '
73- def other_params = params. other_params ? params. other_params : ' '
69+ def splice_flag = params. sj_correction && splice_junctions ? " --spliceJns ${ splice_junctions} " : ' '
70+ // def other_params = params.other_params ? params.other_params : ''
7471 // test if it is actually transcriptclean --version
7572 """
7673 python home/biodocker/TranscriptClean-2.0.2/TranscriptClean.py \\
7774 --SAM ${ sam} \\
7875 --genome ${ fasta} \\
79- ${ variant_flag} \\
80- ${ splice_flag} \\
81- ${ other_params} \\
82- --outprefix "${ prefix} " \\
8376 $args
77+ --outprefix "${ prefix} " \\
8478
8579 cat <<-END_VERSIONS > versions.yml
8680 "${ task.process} ":
@@ -104,8 +98,43 @@ process TRANSCRIPTCLEAN {
10498 """
10599}
106100
107- // Add process to generate report later :(
101+ process GENERATE_REPORT {
102+ tag " Generate TranscriptClean report"
103+ label ' process_high'
108104
109- /* process GENERATE_REPORT {
110-
111- } */
105+ container " ${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
106+ 'biocontainers/transcriptclean:v2.0.2_cv1':
107+ 'biocontainers/transcriptclean:v2.0.2_cv1' } "
108+
109+ input:
110+ tuple val(meta), path(transcriptclean_logs)
111+
112+ output:
113+ tuple val(meta), path(" *_report.pdf" ), emit: pdf
114+ path " versions.yml" , emit: versions
115+
116+ script:
117+ args = task. ext. args ?: ' '
118+ prefix = task. ext. prefix ?: " ${ meta.id} "
119+ """
120+ Rscript home/biodocker/TranscriptClean-2.0.2/generate_report.R \\
121+ ../results/${ prefix}
122+
123+ cat <<-END_VERSIONS > versions.yml
124+ "${ task.process} ":
125+ transcriptclean: \$ (echo \$ (transcriptclean --version 2>&1) | sed 's/^.*transcriptclean //; s/Using.*\$ //' ))
126+ END_VERSIONS
127+ """
128+
129+ stub:
130+ args = task. ext. args ?: ' '
131+ prefix = task. ext. prefix ?: " ${ meta.id} "
132+ """
133+ touch "${ prefix} "_report.pdf
134+
135+ cat <<-END_VERSIONS > versions.yml
136+ "${ task.process} ":
137+ transcriptclean: \$ (echo \$ (transcriptclean --version 2>&1) | sed 's/^.*transcriptclean //; s/Using.*\$ //' ))
138+ END_VERSIONS
139+ """
140+ }
0 commit comments