From 99a8196776c5ec958357d34c0c89bf44625bfdf8 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Tue, 14 Jul 2020 17:20:12 +0200 Subject: [PATCH] Module bedtools-sort added --- software/bedtools/sort/environment.yml | 9 +++++++ software/bedtools/sort/main.nf | 17 +++++++++++++ software/bedtools/sort/meta.yml | 26 ++++++++++++++++++++ software/bedtools/sort/test/input_data/A.bed | 5 ++++ software/bedtools/sort/test/main.nf | 17 +++++++++++++ software/bedtools/sort/test/nextflow.config | 2 ++ 6 files changed, 76 insertions(+) create mode 100644 software/bedtools/sort/environment.yml create mode 100644 software/bedtools/sort/main.nf create mode 100644 software/bedtools/sort/meta.yml create mode 100644 software/bedtools/sort/test/input_data/A.bed create mode 100644 software/bedtools/sort/test/main.nf create mode 100644 software/bedtools/sort/test/nextflow.config diff --git a/software/bedtools/sort/environment.yml b/software/bedtools/sort/environment.yml new file mode 100644 index 00000000..305a5b8f --- /dev/null +++ b/software/bedtools/sort/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-sort +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bedtools=2.29.2 diff --git a/software/bedtools/sort/main.nf b/software/bedtools/sort/main.nf new file mode 100644 index 00000000..1696b458 --- /dev/null +++ b/software/bedtools/sort/main.nf @@ -0,0 +1,17 @@ +process BEDTOOLS_SORT { + tag { input_file } + + container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' + + input: + path (input_file) + val (bedtools_sort_args) + + output: + stdout() + + script: + """ + bedtools sort -i ${input_file} ${bedtools_sort_args} + """ +} diff --git a/software/bedtools/sort/meta.yml b/software/bedtools/sort/meta.yml new file mode 100644 index 00000000..8452dd2f --- /dev/null +++ b/software/bedtools/sort/meta.yml @@ -0,0 +1,26 @@ +name: bedtools-sort +description: Returns a sorted feature file by chromosome and other criteria +keywords: + - sort +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}" + +output: + - + - index: + type: stdout,file + description: + pattern: "stdout,*.{bed,gff,vcf}" +authors: + - "@JoseEspinosa" diff --git a/software/bedtools/sort/test/input_data/A.bed b/software/bedtools/sort/test/input_data/A.bed new file mode 100644 index 00000000..dc9a4f0c --- /dev/null +++ b/software/bedtools/sort/test/input_data/A.bed @@ -0,0 +1,5 @@ +chr1 951 1061 +chr1 1300 1420 +chr1 1400 1500 + + diff --git a/software/bedtools/sort/test/main.nf b/software/bedtools/sort/test/main.nf new file mode 100644 index 00000000..bbf445e3 --- /dev/null +++ b/software/bedtools/sort/test/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.preview.dsl = 2 + +params.bedtools_sort_args = '' //'-sizeD' + +include check_output from '../../../../tests/functions/check_process_outputs.nf' // params(params) +include BEDTOOLS_SORT from '../main.nf' params(params) + +// Define input channels +ch_input = Channel.fromPath('./input_data/A.bed') + +// Run the workflow +workflow { + BEDTOOLS_SORT(ch_input, params.bedtools_sort_args) + // .check_output() +} diff --git a/software/bedtools/sort/test/nextflow.config b/software/bedtools/sort/test/nextflow.config new file mode 100644 index 00000000..c137a138 --- /dev/null +++ b/software/bedtools/sort/test/nextflow.config @@ -0,0 +1,2 @@ +docker.enabled = true +params.outdir = './results'