ucsc/wigtobigwig: add meta map (#1199)

* add meta info

* updated meta.yml

* Apply suggestions from code review

* Update test.yml

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
Mei Wu 2022-01-11 22:31:37 +01:00 committed by GitHub
parent bdd8159c53
commit 30e64becaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View file

@ -1,7 +1,7 @@
def VERSION = '377' // Version information not provided by tool on CLI
process UCSC_WIGTOBIGWIG {
tag '$wig'
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::ucsc-wigtobigwig=377" : null)
@ -10,21 +10,22 @@ process UCSC_WIGTOBIGWIG {
'quay.io/biocontainers/ucsc-wigtobigwig:377--h0b8a92a_2' }"
input:
path wig
tuple val(meta), path(wig)
path sizes
output:
path "*.bw" , emit: bw
tuple val(meta), path("*.bw"), emit: bw
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
wigToBigWig \\
$args \\
$wig \\
$sizes \\
${wig.getSimpleName()}.bw
${prefix}.bw
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -15,6 +15,11 @@ tools:
licence: ['varies; see http://genome.ucsc.edu/license']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- wig:
type: file
description: wig file
@ -35,3 +40,4 @@ output:
authors:
- "@jianhong"
- "@projectoriented"

View file

@ -6,7 +6,8 @@ include { UCSC_WIGTOBIGWIG } from '../../../../modules/ucsc/wigtobigwig/main.nf'
workflow test_ucsc_wigtobigwig {
input = file(params.test_data['sarscov2']['illumina']['test_wig_gz'], checkIfExists: true)
input = [ [ id:'test', single_end:false ], // meta map,
file(params.test_data['sarscov2']['illumina']['test_wig_gz'], checkIfExists: true) ]
sizes = file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true)

View file

@ -6,3 +6,5 @@
files:
- path: output/ucsc/test.bw
md5sum: b64af7003665dc51fae958216b06ed95
- path: output/ucsc/versions.yml
md5sum: 7e14421c65faf5165389f34806acdb12