Skip to content

Commit

Permalink
remove if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Aug 24, 2023
1 parent 82fa500 commit 011addc
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 106 deletions.
122 changes: 59 additions & 63 deletions conf/modules/sra.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,80 +13,76 @@
//
// Process options for the SRA workflow
//
if (params.input_type == 'sra') {
process {

process {

withName: SRA_IDS_TO_RUNINFO {
publishDir = [
path: { "${params.outdir}/metadata" },
enabled: false
]
}

withName: SRA_RUNINFO_TO_FTP {
publishDir = [
path: { "${params.outdir}/metadata" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SRA_FASTQ_FTP {
ext.args = '--retry 5 --continue-at - --max-time 1200'
publishDir = [
[
path: { "${params.outdir}/fastq" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz"
],
[
path: { "${params.outdir}/fastq/md5" },
mode: params.publish_dir_mode,
pattern: "*.md5"
]
]
}
withName: SRA_IDS_TO_RUNINFO {
publishDir = [
path: { "${params.outdir}/metadata" },
enabled: false
]
}

withName: SRATOOLS_PREFETCH {
publishDir = [
path: { "${params.outdir}/sra" },
enabled: false
]
}
withName: SRA_RUNINFO_TO_FTP {
publishDir = [
path: { "${params.outdir}/metadata" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SRATOOLS_FASTERQDUMP {
ext.args = '--split-files --include-technical'
publishDir = [
withName: SRA_FASTQ_FTP {
ext.args = '--retry 5 --continue-at - --max-time 1200'
publishDir = [
[
path: { "${params.outdir}/fastq" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz"
],
[
path: { "${params.outdir}/fastq/md5" },
mode: params.publish_dir_mode,
pattern: "*.md5"
]
}
]
}

withName: SRA_TO_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
enabled: false
]
}
withName: SRATOOLS_PREFETCH {
publishDir = [
path: { "${params.outdir}/sra" },
enabled: false
]
}

withName: SRA_MERGE_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: SRATOOLS_FASTERQDUMP {
ext.args = '--split-files --include-technical'
publishDir = [
path: { "${params.outdir}/fastq" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz"
]
}

withName: MULTIQC_MAPPINGS_CONFIG {
publishDir = [
path: { "${params.outdir}/samplesheet" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: SRA_TO_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
enabled: false
]
}

withName: SRA_MERGE_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: MULTIQC_MAPPINGS_CONFIG {
publishDir = [
path: { "${params.outdir}/samplesheet" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

}
83 changes: 40 additions & 43 deletions conf/modules/synapse.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,57 +13,54 @@
//
// Process options for the Synapse workflow
//
if (params.input_type == 'synapse') {

process {
process {

withName: SYNAPSE_LIST {
ext.args = '--long'
publishDir = [
path: { "${params.outdir}/metadata" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SYNAPSE_GET {
publishDir = [
[
path: { "${params.outdir}/fastq" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz"
],
[
path: { "${params.outdir}/fastq/md5" },
mode: params.publish_dir_mode,
pattern: "*.md5"
]
]
}
withName: SYNAPSE_LIST {
ext.args = '--long'
publishDir = [
path: { "${params.outdir}/metadata" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SYNAPSE_SHOW {
publishDir = [
path: { "${params.outdir}/metadata" },
withName: SYNAPSE_GET {
publishDir = [
[
path: { "${params.outdir}/fastq" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz"
],
[
path: { "${params.outdir}/fastq/md5" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
pattern: "*.md5"
]
}
]
}

withName: SYNAPSE_TO_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
enabled: false
]
}
withName: SYNAPSE_SHOW {
publishDir = [
path: { "${params.outdir}/metadata" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SYNAPSE_MERGE_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: SYNAPSE_TO_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
enabled: false
]
}

withName: SYNAPSE_MERGE_SAMPLESHEET {
publishDir = [
path: { "${params.outdir}/samplesheet" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

}

0 comments on commit 011addc

Please sign in to comment.