mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
Module intersectbed added
This commit is contained in:
parent
0ffa739cd0
commit
f77a7b4ef5
8 changed files with 91 additions and 0 deletions
7
software/bedtools/intersectbed/Dockerfile
Normal file
7
software/bedtools/intersectbed/Dockerfile
Normal 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
|
9
software/bedtools/intersectbed/environment.yml
Normal file
9
software/bedtools/intersectbed/environment.yml
Normal 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
|
19
software/bedtools/intersectbed/main.nf
Normal file
19
software/bedtools/intersectbed/main.nf
Normal 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}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
|
30
software/bedtools/intersectbed/meta.yml
Normal file
30
software/bedtools/intersectbed/meta.yml
Normal 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"
|
5
software/bedtools/intersectbed/test/input_data/A.bed
Normal file
5
software/bedtools/intersectbed/test/input_data/A.bed
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
chr1 951 1061
|
||||||
|
chr1 1300 1420
|
||||||
|
chr1 1400 1500
|
||||||
|
|
||||||
|
|
1
software/bedtools/intersectbed/test/input_data/B.bed
Normal file
1
software/bedtools/intersectbed/test/input_data/B.bed
Normal file
|
@ -0,0 +1 @@
|
||||||
|
chr1 999 1010
|
18
software/bedtools/intersectbed/test/main.nf
Normal file
18
software/bedtools/intersectbed/test/main.nf
Normal 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()
|
||||||
|
}
|
2
software/bedtools/intersectbed/test/nextflow.config
Normal file
2
software/bedtools/intersectbed/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
docker.enabled = true
|
||||||
|
params.outdir = './results'
|
Loading…
Reference in a new issue