mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
refactor: create new settings input
This commit is contained in:
parent
5d593bdb45
commit
d4f13ebfff
1 changed files with 3 additions and 5 deletions
|
@ -9,6 +9,7 @@ process SRATOOLS_FASTERQDUMP {
|
|||
|
||||
input:
|
||||
tuple val(meta), path(sra)
|
||||
path(ncbi_settings)
|
||||
|
||||
output:
|
||||
tuple val(meta), path(output), emit: reads
|
||||
|
@ -20,16 +21,13 @@ process SRATOOLS_FASTERQDUMP {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n"
|
||||
// Paired-end data extracted by fasterq-dump (--split-3 the default) always creates
|
||||
// *_1.fastq *_2.fastq files but sometimes also an additional *.fastq file
|
||||
// for unpaired reads which we ignore here.
|
||||
output = meta.single_end ? '*.fastq.gz' : '*_{1,2}.fastq.gz'
|
||||
"""
|
||||
eval "\$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')"
|
||||
if [[ ! -f "\${NCBI_SETTINGS}" ]]; then
|
||||
mkdir -p "\$(dirname "\${NCBI_SETTINGS}")"
|
||||
printf '${config}' > "\${NCBI_SETTINGS}"
|
||||
if [[ "${ncbi_settings.name}" != "EXISTS" ]]; then
|
||||
export NCBI_SETTINGS="\$PWD/${ncbi_settings}"
|
||||
fi
|
||||
|
||||
fasterq-dump \\
|
||||
|
|
Loading…
Reference in a new issue