|
0
|
1 process GEN_SAMPLESHEET {
|
|
|
2 tag "${inputdir.simpleName}"
|
|
|
3 label "process_pico"
|
|
|
4
|
|
|
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
|
|
|
6 conda (params.enable_conda ? "conda-forge::python=3.9.5" : null)
|
|
|
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
8 'https://depot.galaxyproject.org/singularity/python:3.9--1' :
|
|
|
9 'quay.io/biocontainers/python:3.9--1' }"
|
|
|
10
|
|
|
11 input:
|
|
|
12 val inputdir
|
|
|
13
|
|
|
14 output:
|
|
|
15 path '*.csv' , emit: csv
|
|
|
16 path 'versions.yml', emit: versions
|
|
|
17
|
|
|
18 when:
|
|
|
19 task.ext.when == null || task.ext.when
|
|
|
20
|
|
|
21 // This script (fastq_dir_to_samplesheet.py) is distributed
|
|
|
22 // as part of the pipeline nf-core/rnaseq/bin/. MIT License.
|
|
|
23 script:
|
|
|
24 def this_script_args = (params.fq_single_end ? ' -se' : '')
|
|
|
25 this_script_args += (params.fq_suffix ? " -r1 '${params.fq_suffix}'" : '')
|
|
|
26 this_script_args += (params.fq2_suffix ? " -r2 '${params.fq2_suffix}'" : '')
|
|
|
27
|
|
|
28 """
|
|
|
29 fastq_dir_to_samplesheet.py -sn \\
|
|
|
30 -st '${params.fq_strandedness}' \\
|
|
|
31 -sd '${params.fq_filename_delim}' \\
|
|
|
32 -si ${params.fq_filename_delim_idx} \\
|
|
|
33 ${this_script_args} \\
|
|
|
34 ${inputdir} autogen_samplesheet.csv
|
|
|
35
|
|
|
36 cat <<-END_VERSIONS > versions.yml
|
|
|
37 "${task.process}":
|
|
|
38 python: \$( python --version | sed 's/Python //g' )
|
|
|
39 END_VERSIONS
|
|
|
40 """
|
|
|
41 } |