mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Add ffq module (#1842)
This commit is contained in:
parent
bd0fa881f6
commit
b96066565a
6 changed files with 111 additions and 0 deletions
36
modules/ffq/main.nf
Normal file
36
modules/ffq/main.nf
Normal file
|
@ -0,0 +1,36 @@
|
|||
process FFQ {
|
||||
tag "${ids.size() == 1 ? ids[0] : "${ids[0]+'..'+ids[-1]}"}"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::ffq=0.2.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/ffq:0.2.1--pyhdfd78af_0':
|
||||
'quay.io/biocontainers/ffq:0.2.1--pyhdfd78af_0' }"
|
||||
|
||||
input:
|
||||
val ids
|
||||
|
||||
output:
|
||||
path "*.json" , emit: json
|
||||
path "versions.yml", emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def id_list = ids.sort()
|
||||
def name = id_list.size() == 1 ? ids[0] : 'metadata'
|
||||
def prefix = task.ext.prefix ?: "${name}"
|
||||
"""
|
||||
ffq \\
|
||||
${id_list.join(' ')} \\
|
||||
$args \\
|
||||
> ${prefix}.json
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
ffq: \$(echo \$(ffq --help 2>&1) | sed 's/^.*ffq //; s/: A command.*\$//' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
36
modules/ffq/meta.yml
Normal file
36
modules/ffq/meta.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: "ffq"
|
||||
description: A command line tool that makes it easier to find sequencing data from the SRA / GEO / ENA.
|
||||
keywords:
|
||||
- SRA
|
||||
- ENA
|
||||
- GEO
|
||||
- metadata
|
||||
- fetch
|
||||
- public
|
||||
- databases
|
||||
tools:
|
||||
- "ffq":
|
||||
description: "A command line tool that makes it easier to find sequencing data from the SRA / GEO / ENA."
|
||||
homepage: https://github.com/pachterlab/ffq
|
||||
documentation: https://github.com/pachterlab/ffq#usage
|
||||
tool_dev_url: https://github.com/pachterlab/ffq
|
||||
doi: "10.1101/2022.05.18.492548"
|
||||
licence: "['MIT']"
|
||||
|
||||
input:
|
||||
- ids:
|
||||
type: list
|
||||
description: List of supported database ids e.g. SRA / GEO / ENA
|
||||
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- json:
|
||||
type: file
|
||||
description: JSON file containing metadata for ids
|
||||
pattern: "*.{json}"
|
||||
|
||||
authors:
|
||||
- "@drpatelh"
|
|
@ -715,6 +715,10 @@ fasttree:
|
|||
- modules/fasttree/**
|
||||
- tests/modules/fasttree/**
|
||||
|
||||
ffq:
|
||||
- modules/ffq/**
|
||||
- tests/modules/ffq/**
|
||||
|
||||
fgbio/callmolecularconsensusreads:
|
||||
- modules/fgbio/callmolecularconsensusreads/**
|
||||
- tests/modules/fgbio/callmolecularconsensusreads/**
|
||||
|
|
15
tests/modules/ffq/main.nf
Normal file
15
tests/modules/ffq/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { FFQ } from '../../../modules/ffq/main.nf'
|
||||
|
||||
workflow test_ffq_single_id {
|
||||
|
||||
FFQ ( [ 'SRR9990627' ] )
|
||||
}
|
||||
|
||||
workflow test_ffq_multiple_ids {
|
||||
|
||||
FFQ ( [ 'SRR9990627', 'SRX7347523' ] )
|
||||
}
|
5
tests/modules/ffq/nextflow.config
Normal file
5
tests/modules/ffq/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
15
tests/modules/ffq/test.yml
Normal file
15
tests/modules/ffq/test.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
- name: ffq test_ffq_single_id
|
||||
command: nextflow run ./tests/modules/ffq -entry test_ffq_single_id -c ./tests/config/nextflow.config -c ./tests/modules/ffq/nextflow.config
|
||||
tags:
|
||||
- ffq
|
||||
files:
|
||||
- path: output/ffq/SRR9990627.json
|
||||
md5sum: 68db6114ef348f721c139cd4c9534f73
|
||||
|
||||
- name: ffq test_ffq_multiple_ids
|
||||
command: nextflow run ./tests/modules/ffq -entry test_ffq_multiple_ids -c ./tests/config/nextflow.config -c ./tests/modules/ffq/nextflow.config
|
||||
tags:
|
||||
- ffq
|
||||
files:
|
||||
- path: output/ffq/metadata.json
|
||||
md5sum: af253a5587b54520f01a0ff5715b0c0a
|
Loading…
Reference in a new issue