Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ext config as params #308

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 ?: ''
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
Loading