diff --git a/software/bedtools/complementbed/Dockerfile b/software/bedtools/complementbed/Dockerfile new file mode 100644 index 00000000..7eaea60c --- /dev/null +++ b/software/bedtools/complementbed/Dockerfile @@ -0,0 +1,7 @@ +FROM nfcore/base +LABEL authors="Jose Espinosa-Carrasco" \ + description="Docker image containing all requirements for nf-core/modules/bedtools/complementbed" + +COPY environment.yml / +RUN conda env create -f /environment.yml && conda clean -a +ENV PATH /opt/conda/envs/nf-core-bedtools-complementbed/bin:$PATH diff --git a/software/bedtools/complementbed/environment.yml b/software/bedtools/complementbed/environment.yml new file mode 100644 index 00000000..cb03d5e4 --- /dev/null +++ b/software/bedtools/complementbed/environment.yml @@ -0,0 +1,9 @@ +# You can use this file to create a conda environment for this pipeline: +# conda env create -f environment.yml +name: nf-core-bedtools-complementbed +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bedtools=2.29.2 diff --git a/software/bedtools/complementbed/main.nf b/software/bedtools/complementbed/main.nf new file mode 100644 index 00000000..d22ce418 --- /dev/null +++ b/software/bedtools/complementbed/main.nf @@ -0,0 +1,18 @@ +process COMPLEMENT_BED { + tag {input_file} + + container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' + + input: + path (input_file) + path (fasta_sizes) + val (complementbed_args) + + output: + stdout() + + script: + """ + bedtools complement -i ${input_file} -g ${fasta_sizes} ${complementbed_args} + """ +} diff --git a/software/bedtools/complementbed/meta.yml b/software/bedtools/complementbed/meta.yml new file mode 100644 index 00000000..44be3f83 --- /dev/null +++ b/software/bedtools/complementbed/meta.yml @@ -0,0 +1,30 @@ +name: bedtools complement +description: Returns all intervals in a genome that are not covered by at least one interval in the input BED/GFF/VCF file +keywords: + - complement +tools: + - bedtools: + description: | + Bedtools is a software package that provides with a toolset to perform genome arithmetic operations. + homepage: https://bedtools.readthedocs.io/en/latest/index.html + documentation: https://bedtools.readthedocs.io/en/latest/index.html + doi: 10.093/bioinformatics/btq033 +input: + - + - input_file: + type: file + description: Input genomic coordinates file + pattern: "*.{bed,gff,vcf}" + - fasta_sizes: + type: file + description: Genome chromosome sizes + pattern: "*.{txt,sizes}" + +output: + - + - index: + type: stdout,file + description: + pattern: "stdout,*.{bed,gff,vcf}" +authors: + - "@JoseEspinosa" diff --git a/software/bedtools/complementbed/test/input_data/A.bed b/software/bedtools/complementbed/test/input_data/A.bed new file mode 100644 index 00000000..dc9a4f0c --- /dev/null +++ b/software/bedtools/complementbed/test/input_data/A.bed @@ -0,0 +1,5 @@ +chr1 951 1061 +chr1 1300 1420 +chr1 1400 1500 + + diff --git a/software/bedtools/complementbed/test/input_data/genome.sizes b/software/bedtools/complementbed/test/input_data/genome.sizes new file mode 100644 index 00000000..8cc54558 --- /dev/null +++ b/software/bedtools/complementbed/test/input_data/genome.sizes @@ -0,0 +1 @@ +chr1 1780869 diff --git a/software/bedtools/complementbed/test/main.nf b/software/bedtools/complementbed/test/main.nf new file mode 100644 index 00000000..9efe59f6 --- /dev/null +++ b/software/bedtools/complementbed/test/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.preview.dsl = 2 + +params.complementbed_args = '' + +include check_output from '../../../../tests/functions/check_process_outputs.nf' // params(params) +include COMPLEMENT_BED from '../main.nf' params(params) + +// Define input channels +ch_input = Channel.fromPath('./input_data/A.bed') +chrom_sizes = Channel.fromPath('./input_data/genome.sizes') + +// Run the workflow +workflow { + COMPLEMENT_BED(ch_input, chrom_sizes, params.complementbed_args) + // .check_output() +} diff --git a/software/bedtools/complementbed/test/nextflow.config b/software/bedtools/complementbed/test/nextflow.config new file mode 100644 index 00000000..c137a138 --- /dev/null +++ b/software/bedtools/complementbed/test/nextflow.config @@ -0,0 +1,2 @@ +docker.enabled = true +params.outdir = './results'