mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
feat(homer): Add pos2bed module (#1435)
* feat(homer): Add pos2bed module * test(homer): Pass bed format * test(homer): Add upstream dependencies to avoid regressions * Update modules/homer/pos2bed/main.nf Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
This commit is contained in:
parent
3d31fa4d04
commit
98ed71c8f6
6 changed files with 119 additions and 0 deletions
33
modules/homer/pos2bed/main.nf
Normal file
33
modules/homer/pos2bed/main.nf
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
def VERSION = '4.11' // Version information not provided by tool on CLI
|
||||||
|
|
||||||
|
process HOMER_POS2BED {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_medium'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::homer=4.11" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/homer:4.11--pl526hc9558a2_3' :
|
||||||
|
'quay.io/biocontainers/homer:4.11--pl526hc9558a2_3' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(peaks)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.bed"), emit: bed
|
||||||
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
|
when:
|
||||||
|
task.ext.when == null || task.ext.when
|
||||||
|
|
||||||
|
script:
|
||||||
|
def args = task.ext.args ?: ''
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
"""
|
||||||
|
pos2bed.pl $peaks > ${prefix}.bed
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
homer: $VERSION
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
42
modules/homer/pos2bed/meta.yml
Normal file
42
modules/homer/pos2bed/meta.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: "homer_pos2bed"
|
||||||
|
description: Coverting from HOMER peak to BED file formats
|
||||||
|
keywords:
|
||||||
|
- peaks
|
||||||
|
tools:
|
||||||
|
- "homer":
|
||||||
|
description: |
|
||||||
|
HOMER (Hypergeometric Optimization of Motif EnRichment) is a suite of tools for Motif Discovery and next-gen sequencing analysis.
|
||||||
|
homepage: "http://homer.ucsd.edu/homer/index.html"
|
||||||
|
documentation: "http://homer.ucsd.edu/homer/"
|
||||||
|
tool_dev_url: "http://homer.ucsd.edu/homer/ngs/miscellaneous.html"
|
||||||
|
doi: 10.1016/j.molcel.2010.05.004.
|
||||||
|
licence: ["GPL-3.0-or-later"]
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- tagDir:
|
||||||
|
type: directory
|
||||||
|
description: "The 'Tag Directory'"
|
||||||
|
pattern: "tagDir"
|
||||||
|
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- bed:
|
||||||
|
type: file
|
||||||
|
description: BED file
|
||||||
|
pattern: "*.bed"
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@Emiller88"
|
|
@ -887,6 +887,12 @@ homer/makeucscfile:
|
||||||
- modules/homer/makeucscfile/**
|
- modules/homer/makeucscfile/**
|
||||||
- tests/modules/homer/makeucscfile/**
|
- tests/modules/homer/makeucscfile/**
|
||||||
|
|
||||||
|
homer/pos2bed:
|
||||||
|
- modules/homer/pos2bed/**
|
||||||
|
- modules/homer/maketagdirectory/**
|
||||||
|
- modules/homer/findpeaks/**
|
||||||
|
- tests/modules/homer/pos2bed/**
|
||||||
|
|
||||||
hpsuissero:
|
hpsuissero:
|
||||||
- modules/hpsuissero/**
|
- modules/hpsuissero/**
|
||||||
- tests/modules/hpsuissero/**
|
- tests/modules/hpsuissero/**
|
||||||
|
|
19
tests/modules/homer/pos2bed/main.nf
Normal file
19
tests/modules/homer/pos2bed/main.nf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { HOMER_MAKETAGDIRECTORY } from '../../../../modules/homer/maketagdirectory/main.nf'
|
||||||
|
include { HOMER_FINDPEAKS } from '../../../../modules/homer/findpeaks/main.nf'
|
||||||
|
include { HOMER_POS2BED } from '../../../../modules/homer/pos2bed/main.nf'
|
||||||
|
|
||||||
|
workflow test_homer_pos2bed {
|
||||||
|
input = [[id:'test'],
|
||||||
|
[file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true),
|
||||||
|
file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]]
|
||||||
|
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
|
||||||
|
HOMER_MAKETAGDIRECTORY (input, fasta)
|
||||||
|
HOMER_FINDPEAKS ( HOMER_MAKETAGDIRECTORY.out.tagdir )
|
||||||
|
|
||||||
|
HOMER_POS2BED ( HOMER_FINDPEAKS.out.txt )
|
||||||
|
}
|
9
tests/modules/homer/pos2bed/nextflow.config
Normal file
9
tests/modules/homer/pos2bed/nextflow.config
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
withName: HOMER_MAKETAGDIRECTORY {
|
||||||
|
ext.args = '-format bed'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
10
tests/modules/homer/pos2bed/test.yml
Normal file
10
tests/modules/homer/pos2bed/test.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
- name: "homer pos2bed"
|
||||||
|
command: nextflow run ./tests/modules/homer/pos2bed -entry test_homer_pos2bed -c ./tests/config/nextflow.config -c ./tests/modules/homer/pos2bed/nextflow.config
|
||||||
|
tags:
|
||||||
|
- "homer"
|
||||||
|
- "homer/pos2bed"
|
||||||
|
files:
|
||||||
|
- path: "output/homer/test.bed"
|
||||||
|
md5sum: 0b9ebd8f06b9c820a551fbdb2d7635ee
|
||||||
|
- path: output/homer/versions.yml
|
||||||
|
md5sum: 1485f4b2d76484e8fe3310e2505de2fd
|
Loading…
Reference in a new issue