mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-21 18:58:16 +00:00
refactor: require settings input always
This commit is contained in:
parent
a303904eb0
commit
1b228835e9
6 changed files with 7 additions and 61 deletions
|
@ -25,9 +25,8 @@ input:
|
|||
- ncbi_settings:
|
||||
type: file
|
||||
description: >
|
||||
Either a proper NCBI settings file or in case an existing file should be used,
|
||||
a file with name EXISTS.
|
||||
pattern: "*.mkfg | EXISTS"
|
||||
An NCBI user settings file.
|
||||
pattern: "*.mkfg"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
|
|
@ -40,9 +40,7 @@ retry_with_backoff() {
|
|||
echo "${output}"
|
||||
}
|
||||
|
||||
if [[ "!{ncbi_settings.name}" != "EXISTS" ]]; then
|
||||
export NCBI_SETTINGS="$PWD/!{ncbi_settings}"
|
||||
fi
|
||||
export NCBI_SETTINGS="$PWD/!{ncbi_settings}"
|
||||
|
||||
retry_with_backoff !{args2} \
|
||||
prefetch \
|
||||
|
|
|
@ -4,31 +4,12 @@ nextflow.enable.dsl = 2
|
|||
|
||||
include { SRATOOLS_PREFETCH } from '../../../../modules/sratools/prefetch/main.nf'
|
||||
|
||||
workflow test_sratools_prefetch_with_settings_input {
|
||||
|
||||
file(params.settings_path).mkdirs()
|
||||
def settings = file(params.settings_file)
|
||||
settings.text = "/LIBS/GUID = \"5b0d4b7d-88c7-4802-98fd-e3afd06feb32\"\n/libs/cloud/report_instance_identity = \"true\"\n"
|
||||
workflow test_sratools_prefetch {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
'DRR000774'
|
||||
]
|
||||
|
||||
SRATOOLS_PREFETCH(input, settings)
|
||||
SRATOOLS_PREFETCH(input, file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true))
|
||||
}
|
||||
|
||||
workflow test_sratools_prefetch_without_settings_input {
|
||||
|
||||
file(params.settings_path).mkdirs()
|
||||
def settings = file(params.settings_file)
|
||||
settings.text = "/LIBS/GUID = \"5b0d4b7d-88c7-4802-98fd-e3afd06feb32\"\n/libs/cloud/report_instance_identity = \"true\"\n"
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
'DRR000774'
|
||||
]
|
||||
|
||||
SRATOOLS_PREFETCH(input, file('EXISTS'))
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
params.settings_path = '/tmp/.ncbi'
|
||||
params.settings_file = "${params.settings_path}/user-settings.mkfg"
|
||||
|
||||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
params.settings_path = '/tmp/.ncbi'
|
||||
params.settings_file = "${params.settings_path}/user-settings.mkfg"
|
||||
|
||||
env.NCBI_SETTINGS = params.settings_file
|
||||
|
||||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: SRATOOLS_PREFETCH {
|
||||
containerOptions = {
|
||||
(workflow.containerEngine == 'singularity') ?
|
||||
"-B ${params.settings_path}:${params.settings_path}" :
|
||||
"-v ${params.settings_path}:${params.settings_path}"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +1,5 @@
|
|||
- name: sratools prefetch test_sratools_prefetch_with_settings_input
|
||||
command: nextflow run ./tests/modules/sratools/prefetch -entry test_sratools_prefetch_with_settings_input -c ./tests/config/nextflow.config -c ./tests/modules/sratools/prefetch/nextflow.config
|
||||
tags:
|
||||
- sratools/prefetch
|
||||
- sratools
|
||||
files:
|
||||
- path: output/sratools/DRR000774/DRR000774.sra
|
||||
md5sum: 7647dba20c89c0e3d7ad13842f060eb0
|
||||
- path: output/sratools/versions.yml
|
||||
contains:
|
||||
- "sratools: 2.11.0"
|
||||
|
||||
- name: sratools prefetch test_sratools_prefetch_without_settings_input
|
||||
command: nextflow run ./tests/modules/sratools/prefetch -entry test_sratools_prefetch_without_settings_input -c ./tests/config/nextflow.config -c ./tests/modules/sratools/prefetch/nextflow_mount.config
|
||||
- name: sratools prefetch test_sratools_prefetch
|
||||
command: nextflow run ./tests/modules/sratools/prefetch -entry test_sratools_prefetch -c ./tests/config/nextflow.config -c ./tests/modules/sratools/prefetch/nextflow.config
|
||||
tags:
|
||||
- sratools/prefetch
|
||||
- sratools
|
||||
|
|
Loading…
Reference in a new issue