Skip to content

Commit

Permalink
Refactor ext args as params
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Apr 24, 2024
1 parent d9d54b8 commit 774cf7c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion modules/local/aspera_cli/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ process ASPERA_CLI {
input:
tuple val(meta), val(fastq)
val user
var args

output:
tuple val(meta), path("*fastq.gz"), emit: fastq
tuple val(meta), path("*md5") , emit: md5
path "versions.yml" , emit: versions

script:
def args = task.ext.args ?: ''
def conda_prefix = ['singularity', 'apptainer'].contains(workflow.containerEngine) ? "export CONDA_PREFIX=/usr/local" : ""
if (meta.single_end) {
"""
Expand Down
1 change: 0 additions & 1 deletion modules/local/aspera_cli/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
process {
withName: 'ASPERA_CLI' {
ext.args = '-QT -l 300m -P33001'
publishDir = [
[
path: { "${params.outdir}/fastq" },
Expand Down
2 changes: 1 addition & 1 deletion modules/local/sra_fastq_ftp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ process SRA_FASTQ_FTP {

input:
tuple val(meta), val(fastq)
val args

output:
tuple val(meta), path("*fastq.gz"), emit: fastq
tuple val(meta), path("*md5") , emit: md5
path "versions.yml" , emit: versions

script:
def args = task.ext.args ?: ''
if (meta.single_end) {
"""
wget \\
Expand Down
1 change: 0 additions & 1 deletion modules/local/sra_fastq_ftp/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
process {
withName: 'SRA_FASTQ_FTP' {
ext.args = '-t 5 -nv -c -T 60'
publishDir = [
[
path: { "${params.outdir}/fastq" },
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/sratools/fasterqdump/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion modules/nf-core/sratools/fasterqdump/nextflow.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions modules/nf-core/sratools/fasterqdump/tests/nextflow.config

This file was deleted.

5 changes: 5 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ params {
skip_fastq_download = false
dbgap_key = null

aspera_cli_args = '-QT -l 300m -P33001'
sra_fastq_ftp_args = '-t 5 -nv -c -T 60'
sratools_fasterqdump_args = ''
sratools_pigz_args = ''

// Boilerplate options
outdir = null
publish_dir_mode = 'copy'
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions workflows/sra/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ workflow SRA {
// MODULE: If FTP link is provided in run information then download FastQ directly via FTP and validate with md5sums
//
SRA_FASTQ_FTP (
ch_sra_reads.ftp
ch_sra_reads.ftp,
params.sra_fastq_ftp_args ?: ''
)
ch_versions = ch_versions.mix(SRA_FASTQ_FTP.out.versions.first())

Expand All @@ -111,7 +112,8 @@ workflow SRA {
//
ASPERA_CLI (
ch_sra_reads.aspera,
'era-fasp'
'era-fasp',
params.aspera_cli_args ?: ''
)
ch_versions = ch_versions.mix(ASPERA_CLI.out.versions.first())

Expand Down

0 comments on commit 774cf7c

Please sign in to comment.