2020-12-17 08:54:48 -05:00
|
|
|
process SEACR_CALLPEAK {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
2022-06-27 04:35:41 -04:00
|
|
|
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
|
2021-10-21 07:28:59 -04:00
|
|
|
conda (params.enable_conda ? "bioconda::seacr=1.3 conda-forge::r-base=4.0.2 bioconda::bedtools=2.30.0" : null)
|
2021-11-26 02:58:40 -05:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/mulled-v2-03bfeb32fe80910c231f630d4262b83677c8c0f4:f4bb19b68e66de27e4c64306f951d5ff11919931-0' :
|
|
|
|
'quay.io/biocontainers/mulled-v2-03bfeb32fe80910c231f630d4262b83677c8c0f4:f4bb19b68e66de27e4c64306f951d5ff11919931-0' }"
|
2021-01-05 04:54:32 -05:00
|
|
|
|
2020-12-17 08:54:48 -05:00
|
|
|
input:
|
|
|
|
tuple val(meta), path(bedgraph), path(ctrlbedgraph)
|
2021-10-21 07:28:59 -04:00
|
|
|
val (threshold)
|
2021-01-05 04:54:32 -05:00
|
|
|
|
2020-12-17 08:54:48 -05:00
|
|
|
output:
|
|
|
|
tuple val(meta), path("*.bed"), emit: bed
|
2021-10-01 09:04:56 -04:00
|
|
|
path "versions.yml" , emit: versions
|
2020-12-17 08:54:48 -05:00
|
|
|
|
2022-02-04 03:53:32 -05:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2020-12-17 08:54:48 -05:00
|
|
|
script:
|
2021-11-26 02:58:40 -05:00
|
|
|
def args = task.ext.args ?: ''
|
2021-12-02 07:39:55 -05:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
2021-10-21 07:28:59 -04:00
|
|
|
def function_switch = ctrlbedgraph ? "$ctrlbedgraph" : "$threshold"
|
2022-06-27 04:35:41 -04:00
|
|
|
def VERSION = '1.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
|
2020-12-17 08:54:48 -05:00
|
|
|
"""
|
2021-01-05 04:50:47 -05:00
|
|
|
SEACR_1.3.sh \\
|
2020-12-17 08:54:48 -05:00
|
|
|
$bedgraph \\
|
2021-10-21 07:28:59 -04:00
|
|
|
$function_switch \\
|
2021-11-26 02:58:40 -05:00
|
|
|
$args \\
|
2020-12-17 08:54:48 -05:00
|
|
|
$prefix
|
2021-11-26 02:58:40 -05:00
|
|
|
|
2021-09-27 04:41:24 -04:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 02:58:40 -05:00
|
|
|
"${task.process}":
|
|
|
|
seacr: $VERSION
|
2021-09-28 09:37:47 -04:00
|
|
|
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
|
|
|
|
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
|
2021-09-27 04:41:24 -04:00
|
|
|
END_VERSIONS
|
2020-12-17 08:54:48 -05:00
|
|
|
"""
|
2021-01-05 05:20:13 -05:00
|
|
|
}
|