Skip to content

Commit

Permalink
fix output that was not published in outdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Juke34 committed Jan 25, 2025
1 parent 3338c37 commit 1d1193f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/salmon.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process salmon_index {

process salmon_guess_lib {
label 'salmon'
publishDir "${params.outdir}/${outpath}", pattern: "*", mode: 'copy'
publishDir "${params.outdir}/${outpath}", pattern: "*/*.json", mode: 'copy'

input:
tuple val(id), path(fastq)
Expand All @@ -29,7 +29,7 @@ process salmon_guess_lib {

output:
tuple val(id), env(LIBTYPE), emit: tuple_id_libtype

path "*/*lib_format_counts.json"

script:

Expand All @@ -44,6 +44,8 @@ process salmon_guess_lib {
salmon quant -i ${salmon_index} -l A ${input} --thread ${task.cpus} -o ${output} --minAssignedFrags 2
# extract the result
LIBTYPE=\$(grep expected_format ${output}/lib_format_counts.json | awk '{print \$2}' | tr -d '",\n')
# change output name
mv ${output}/lib_format_counts.json ${output}/${id}_lib_format_counts.json
"""

}
Expand Down

0 comments on commit 1d1193f

Please sign in to comment.