diff --git a/software/bedtools/genomecov/Dockerfile b/software/bedtools/genomecov/Dockerfile index 9257fbd8..c3211e5d 100644 --- a/software/bedtools/genomecov/Dockerfile +++ b/software/bedtools/genomecov/Dockerfile @@ -4,4 +4,4 @@ LABEL authors="Jose Espinosa-Carrasco" \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -ENV PATH /opt/conda/envs/nf-core-bedtools-complementbed/bin:$PATH +ENV PATH /opt/conda/envs/nf-core-bedtools-genomecov/bin:$PATH diff --git a/software/bedtools/genomecov/main.nf b/software/bedtools/genomecov/main.nf index aa83331b..9ae6466d 100644 --- a/software/bedtools/genomecov/main.nf +++ b/software/bedtools/genomecov/main.nf @@ -1,18 +1,33 @@ +def MODULE = "bedtools_genomecov" +params.publish_dir = MODULE +params.publish_results = "default" + process BEDTOOLS_GENOMECOV { 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" container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' + conda "${moduleDir}/environment.yml" + input: path (bam) path (chrom_sizes) val (bedtools_genomecov_args) output: - stdout() + path "${bam}.bed", emit: coverage + path "*.version.txt", emit: version script: """ - bedtools genomecov -ibam ${bam} -g ${chrom_sizes} ${bedtools_genomecov_args} + bedtools genomecov -ibam ${bam} -g ${chrom_sizes} ${bedtools_genomecov_args} > ${bam}.bed + bedtools --version | sed -n "s/.*\\(v.*\$\\)/\\1/p" > bedtools.version.txt """ } diff --git a/software/bedtools/genomecov/test/input_data/JK2067_downsampled_s0.1.bam b/software/bedtools/genomecov/test/input_data/JK2067_downsampled_s0.1.bam deleted file mode 100644 index bf18ab69..00000000 Binary files a/software/bedtools/genomecov/test/input_data/JK2067_downsampled_s0.1.bam and /dev/null differ diff --git a/software/bedtools/genomecov/test/input_data/JK2067_downsampled_s0.1.bam b/software/bedtools/genomecov/test/input_data/JK2067_downsampled_s0.1.bam new file mode 120000 index 00000000..50ca10b6 --- /dev/null +++ b/software/bedtools/genomecov/test/input_data/JK2067_downsampled_s0.1.bam @@ -0,0 +1 @@ +../../../../../tests/data/bam/JK2067_downsampled_s0.1.bam \ No newline at end of file diff --git a/software/bedtools/genomecov/test/input_data/genome.sizes b/software/bedtools/genomecov/test/input_data/genome.sizes deleted file mode 100644 index 8cc54558..00000000 --- a/software/bedtools/genomecov/test/input_data/genome.sizes +++ /dev/null @@ -1 +0,0 @@ -chr1 1780869 diff --git a/software/bedtools/genomecov/test/input_data/genome.sizes b/software/bedtools/genomecov/test/input_data/genome.sizes new file mode 120000 index 00000000..3457e6c9 --- /dev/null +++ b/software/bedtools/genomecov/test/input_data/genome.sizes @@ -0,0 +1 @@ +../../../../../tests/data/bed/genome.sizes \ No newline at end of file diff --git a/software/bedtools/genomecov/test/main.nf b/software/bedtools/genomecov/test/main.nf index b347a44f..50d6bd6e 100644 --- a/software/bedtools/genomecov/test/main.nf +++ b/software/bedtools/genomecov/test/main.nf @@ -2,9 +2,11 @@ nextflow.preview.dsl = 2 +params.out_dir = "test_output" +params.fastqc_args = '' +params.publish_dir_mode = "copy" params.bedtools_genomecov_args = '' //'-bg' -include check_output from '../../../../tests/functions/check_process_outputs.nf' // params(params) include BEDTOOLS_GENOMECOV from '../main.nf' params(params) // Define input channels @@ -14,5 +16,4 @@ chrom_sizes = Channel.fromPath('./input_data/genome.sizes') // Run the workflow workflow { BEDTOOLS_GENOMECOV(ch_input, chrom_sizes, params.bedtools_genomecov_args) - // .check_output() } diff --git a/software/bedtools/genomecov/test/nextflow.config b/software/bedtools/genomecov/test/nextflow.config deleted file mode 100644 index c137a138..00000000 --- a/software/bedtools/genomecov/test/nextflow.config +++ /dev/null @@ -1,2 +0,0 @@ -docker.enabled = true -params.outdir = './results'