mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
a6ca2b006b
* add software/cooler * fix the wrong files uploaded. * create a branch for cooler/merge * remove the bin_size from metadata. * update the test_data to test-datasets * update pytest_modules.yml * update the test file from single input file to two input file. update the output file from hdf5 to bedpe. * update the version.txt to version.yml and functions.nf * change version.yml to versions * update the test file path and fix the output versions. * Update meta.yml Correct "version" to "versions" * Update main.nf Fix typo * Update main.nf Remove some spaces Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk>
41 lines
1.4 KiB
Text
41 lines
1.4 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process COOLER_MERGE {
|
|
tag "$meta.id"
|
|
label 'process_high'
|
|
publishDir "${params.outdir}",
|
|
mode: params.publish_dir_mode,
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
|
|
|
conda (params.enable_conda ? "bioconda::cooler=0.8.11" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/cooler:0.8.11--pyh3252c3a_0"
|
|
} else {
|
|
container "quay.io/biocontainers/cooler:0.8.11--pyh3252c3a_0"
|
|
}
|
|
|
|
input:
|
|
tuple val(meta), path(cool)
|
|
|
|
output:
|
|
tuple val(meta), path("*.cool"), emit: cool
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
"""
|
|
cooler merge \\
|
|
$options.args \\
|
|
${prefix}.cool \\
|
|
${cool}
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$(cooler --version 2>&1 | sed 's/cooler, version //')
|
|
END_VERSIONS
|
|
"""
|
|
}
|