mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
tests: run prefetch with and without given settings
This commit is contained in:
parent
f6936e5270
commit
145e2f80e9
4 changed files with 61 additions and 7 deletions
|
@ -4,12 +4,31 @@ nextflow.enable.dsl = 2
|
|||
|
||||
include { SRATOOLS_PREFETCH } from '../../../../modules/sratools/prefetch/main.nf'
|
||||
|
||||
workflow test_sratools_prefetch {
|
||||
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"
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
'ERR2815334'
|
||||
'DRR000774'
|
||||
]
|
||||
|
||||
SRATOOLS_PREFETCH ( input )
|
||||
SRATOOLS_PREFETCH(input, settings)
|
||||
}
|
||||
|
||||
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,3 +1,6 @@
|
|||
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()}" }
|
||||
|
|
17
tests/modules/sratools/prefetch/nextflow_mount.config
Normal file
17
tests/modules/sratools/prefetch/nextflow_mount.config
Normal file
|
@ -0,0 +1,17 @@
|
|||
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,8 +1,23 @@
|
|||
- 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
|
||||
- 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/ERR2815334/ERR2815334.sra
|
||||
md5sum: 9a98c7f6f4774b7ef94aa915b92a54ea
|
||||
- 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
|
||||
tags:
|
||||
- sratools/prefetch
|
||||
- sratools
|
||||
files:
|
||||
- path: output/sratools/DRR000774/DRR000774.sra
|
||||
md5sum: 7647dba20c89c0e3d7ad13842f060eb0
|
||||
- path: output/sratools/versions.yml
|
||||
contains:
|
||||
- "sratools: 2.11.0"
|
||||
|
|
Loading…
Reference in a new issue