mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Bedtools sort adapted to the current module standard
This commit is contained in:
parent
4d2e375a0d
commit
6d8b616975
5 changed files with 22 additions and 12 deletions
|
@ -1,17 +1,32 @@
|
||||||
|
def MODULE = "bedtools_sort"
|
||||||
|
params.publish_dir = MODULE
|
||||||
|
params.publish_results = "default"
|
||||||
|
|
||||||
process BEDTOOLS_SORT {
|
process BEDTOOLS_SORT {
|
||||||
tag { input_file }
|
tag { input_file }
|
||||||
|
|
||||||
|
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'
|
container 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0'
|
||||||
|
|
||||||
|
conda "${moduleDir}/environment.yml"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
path (input_file)
|
path (input_file)
|
||||||
val (bedtools_sort_args)
|
val (bedtools_sort_args)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
stdout()
|
path "${input_file}.bed", emit: sort
|
||||||
|
path "*.version.txt", emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
"""
|
"""
|
||||||
bedtools sort -i ${input_file} ${bedtools_sort_args}
|
bedtools sort -i ${input_file} ${bedtools_sort_args} > ${input_file}.bed
|
||||||
|
bedtools --version | sed -n "s/.*\\(v.*\$\\)/\\1/p" > bedtools.version.txt
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: bedtools-sort
|
name: bedtools sort
|
||||||
description: Returns a sorted feature file by chromosome and other criteria
|
description: Returns a sorted feature file by chromosome and other criteria
|
||||||
keywords:
|
keywords:
|
||||||
- sort
|
- sort
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
chr1 951 1061
|
|
||||||
chr1 1300 1420
|
|
||||||
chr1 1400 1500
|
|
||||||
|
|
||||||
|
|
1
software/bedtools/sort/test/input_data/A.bed
Symbolic link
1
software/bedtools/sort/test/input_data/A.bed
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../../../tests/data/bed/A.bed
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
nextflow.preview.dsl = 2
|
nextflow.preview.dsl = 2
|
||||||
|
|
||||||
|
params.out_dir = "test_output"
|
||||||
|
params.fastqc_args = ''
|
||||||
|
params.publish_dir_mode = "copy"
|
||||||
params.bedtools_sort_args = '' //'-sizeD'
|
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)
|
include BEDTOOLS_SORT from '../main.nf' params(params)
|
||||||
|
|
||||||
// Define input channels
|
// Define input channels
|
||||||
|
@ -13,5 +15,4 @@ ch_input = Channel.fromPath('./input_data/A.bed')
|
||||||
// Run the workflow
|
// Run the workflow
|
||||||
workflow {
|
workflow {
|
||||||
BEDTOOLS_SORT(ch_input, params.bedtools_sort_args)
|
BEDTOOLS_SORT(ch_input, params.bedtools_sort_args)
|
||||||
// .check_output()
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
docker.enabled = true
|
|
||||||
params.outdir = './results'
|
|
Loading…
Reference in a new issue