2020-09-10 11:45:11 -04:00
|
|
|
// Import generic module functions
|
|
|
|
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
|
|
|
|
2020-10-14 13:59:25 -04:00
|
|
|
params.options = [:]
|
2021-03-15 08:16:43 -04:00
|
|
|
options = initOptions(params.options)
|
2020-10-14 13:59:25 -04:00
|
|
|
|
2020-09-10 11:45:11 -04:00
|
|
|
def VERSION = '377'
|
|
|
|
|
2020-12-09 16:20:26 -05:00
|
|
|
process UCSC_BEDGRAPHTOBIGWIG {
|
2020-09-10 11:45:11 -04:00
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
publishDir "${params.outdir}",
|
|
|
|
mode: params.publish_dir_mode,
|
2021-04-09 12:23:56 -04:00
|
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
2020-09-10 11:45:11 -04:00
|
|
|
|
2021-02-16 18:58:23 -05:00
|
|
|
conda (params.enable_conda ? "bioconda::ucsc-bedgraphtobigwig=377" : null)
|
2020-12-13 18:41:53 -05:00
|
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
|
|
container "https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1"
|
|
|
|
} else {
|
|
|
|
container "quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1"
|
|
|
|
}
|
2020-12-17 18:50:24 -05:00
|
|
|
|
2020-09-10 11:45:11 -04:00
|
|
|
input:
|
|
|
|
tuple val(meta), path(bedgraph)
|
|
|
|
path sizes
|
2020-12-17 18:50:24 -05:00
|
|
|
|
2020-09-10 11:45:11 -04:00
|
|
|
output:
|
|
|
|
tuple val(meta), path("*.bigWig"), emit: bigwig
|
|
|
|
path "*.version.txt" , emit: version
|
|
|
|
|
|
|
|
script:
|
|
|
|
def software = getSoftwareName(task.process)
|
2020-10-14 13:59:25 -04:00
|
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
2020-09-10 11:45:11 -04:00
|
|
|
"""
|
|
|
|
bedGraphToBigWig $bedgraph $sizes ${prefix}.bigWig
|
|
|
|
echo $VERSION > ${software}.version.txt
|
|
|
|
"""
|
|
|
|
}
|