Module intersectbed added

This commit is contained in:
JoseEspinosa 2020-07-14 16:17:23 +02:00
parent 0ffa739cd0
commit f77a7b4ef5
8 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,7 @@
FROM nfcore/base
LABEL authors="Jose Espinosa-Carrasco" \
description="Docker image containing all requirements for nf-core/modules/bedtools/intersect"
COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-bedtools-intersectbed/bin:$PATH

View file

@ -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-intersectbed
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::bedtools=2.29.2

View file

@ -0,0 +1,19 @@
process INTERSECT_BED {
tag "$input_file_1-$input_file_2"
container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0'
input:
path (input_file_1)
path (input_file_2)
val (intersectbed_args)
output:
stdout()
script:
"""
bedtools intersect -a ${input_file_1} -b ${input_file_2} ${intersectbed_args}
"""
}

View file

@ -0,0 +1,30 @@
name: bedtools intersect
description: Returns the overlapping features between two sets of genomics features
keywords:
- intersect,bed,bedtools
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_1:
type: file
description: Input genomic coordinates file
pattern: "*.{bam,bed,BED,gff,vcf}"
- input_file_2:
type: file
description: Input genomic coordinates file
pattern: "*.{bam,bed,BED,gff,vcf}"
output:
-
- index:
type: stdout,file
description:
pattern: "stdout,*.{bed,BED}"
authors:
- "@JoseEspinosa"

View file

@ -0,0 +1,5 @@
chr1 951 1061
chr1 1300 1420
chr1 1400 1500

View file

@ -0,0 +1 @@
chr1 999 1010

View file

@ -0,0 +1,18 @@
#!/usr/bin/env nextflow
nextflow.preview.dsl = 2
params.intersect_args = '' //'-bed -c -f 0.20'
include check_output from '../../../../tests/functions/check_process_outputs.nf' // params(params)
include INTERSECT_BED from '../main.nf' params(params)
// Define input channels
ch_input_1 = Channel.fromPath('./input_data/A.bed')
ch_input_2 = Channel.fromPath('./input_data/B.bed')
// Run the workflow
workflow {
INTERSECT_BED(ch_input_1, ch_input_2, params.intersect_args)
// .check_output()
}

View file

@ -0,0 +1,2 @@
docker.enabled = true
params.outdir = './results'