nf-core_modules/deprecated/bedtools/genomecov/main.nf

33 lines
844 B
Text
Raw Normal View History

def MODULE = "bedtools_genomecov"
params.publish_dir = MODULE
params.publish_results = "default"
process BEDTOOLS_GENOMECOV {
2020-07-14 14:00:10 +00:00
tag {bam}
publishDir "${params.out_dir}/${params.publish_dir}",
mode: params.publish_dir_mode,
saveAs: { filename ->
if (params.publish_results == "none") null
else filename }
container "docker.pkg.github.com/nf-core/$MODULE"
2020-07-14 14:00:10 +00:00
conda "${moduleDir}/environment.yml"
2020-07-14 14:00:10 +00:00
input:
path (bam)
path (chrom_sizes)
val (bedtools_genomecov_args)
2020-07-14 14:00:10 +00:00
output:
path "${bam}.bed", emit: coverage
path "*.version.txt", emit: version
2020-07-14 14:00:10 +00:00
script:
"""
bedtools genomecov -ibam ${bam} -g ${chrom_sizes} ${bedtools_genomecov_args} > ${bam}.bed
bedtools --version | sed -n "s/.*\\(v.*\$\\)/\\1/p" > bedtools.version.txt
2020-07-14 14:00:10 +00:00
"""
}