mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Merge branch 'master' into motus_profile
This commit is contained in:
commit
965fabdd54
17 changed files with 387 additions and 0 deletions
38
modules/bedtools/split/main.nf
Normal file
38
modules/bedtools/split/main.nf
Normal file
|
@ -0,0 +1,38 @@
|
|||
process BEDTOOLS_SPLIT {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::bedtools=2.30.0" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--h468198e_3':
|
||||
'quay.io/biocontainers/bedtools:2.30.0--h7d7f7ad_2' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bed)
|
||||
val(number_of_files)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bed"), emit: beds
|
||||
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}"
|
||||
|
||||
"""
|
||||
bedtools \\
|
||||
split \\
|
||||
$args \\
|
||||
-i $bed \\
|
||||
-p $prefix \\
|
||||
-n $number_of_files
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
41
modules/bedtools/split/meta.yml
Normal file
41
modules/bedtools/split/meta.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: "bedtools_split"
|
||||
description: Split BED files into several smaller BED files
|
||||
keywords:
|
||||
- sort
|
||||
tools:
|
||||
- "bedtools":
|
||||
description: "A powerful toolset for genome arithmetic"
|
||||
documentation: "https://bedtools.readthedocs.io/en/latest/content/tools/sort.html"
|
||||
licence: "['MIT', 'GPL v2']"
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bed:
|
||||
type: file
|
||||
description: BED file
|
||||
pattern: "*.bed"
|
||||
- bed:
|
||||
type: value
|
||||
description: The number of files to split the BED into
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- beds:
|
||||
type: file
|
||||
description: list of split BED files
|
||||
pattern: "*.bed"
|
||||
|
||||
authors:
|
||||
- "@nvnieuwk"
|
38
modules/biobambam/bammerge/main.nf
Normal file
38
modules/biobambam/bammerge/main.nf
Normal file
|
@ -0,0 +1,38 @@
|
|||
process BIOBAMBAM_BAMMERGE {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::biobambam=2.0.183" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1':
|
||||
'quay.io/biocontainers/biobambam:2.0.183--h9f5acd7_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("${prefix}.bam") ,emit: bam
|
||||
tuple val(meta), path("*.bai") ,optional:true, emit: bam_index
|
||||
tuple val(meta), path("*.md5") ,optional:true, emit: checksum
|
||||
path "versions.yml" ,emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def input_string = bam.join(" I=")
|
||||
|
||||
"""
|
||||
bammerge \\
|
||||
I=${input_string} \\
|
||||
$args \\
|
||||
> ${prefix}.bam
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
bammerge: \$( bammerge --version |& sed '1!d; s/.*version //; s/.\$//' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
46
modules/biobambam/bammerge/meta.yml
Normal file
46
modules/biobambam/bammerge/meta.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: biobambam_bammerge
|
||||
description: Merge a list of sorted bam files
|
||||
keywords:
|
||||
- merge
|
||||
- bam
|
||||
tools:
|
||||
- biobambam:
|
||||
description: |
|
||||
biobambam is a set of tools for early stage alignment file processing.
|
||||
homepage: https://gitlab.com/german.tischler/biobambam2
|
||||
documentation: https://gitlab.com/german.tischler/biobambam2/-/blob/master/README.md
|
||||
doi: 10.1186/1751-0473-9-13
|
||||
licence: ["GPL v3"]
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: List containing 1 or more bam files
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: Merged BAM file
|
||||
pattern: "*.bam"
|
||||
- bam_index:
|
||||
type: file
|
||||
description: BAM index file
|
||||
pattern: "*"
|
||||
- checksum:
|
||||
type: file
|
||||
description: Checksum file
|
||||
pattern: "*"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
authors:
|
||||
- "@matthdsm"
|
45
modules/hmtnote/main.nf
Normal file
45
modules/hmtnote/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
|||
process HMTNOTE {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::hmtnote=0.7.2" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/hmtnote:0.7.2--pyhdfd78af_0':
|
||||
'quay.io/biocontainers/hmtnote:0.7.2--pyhdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*_annotated.vcf"), emit: vcf
|
||||
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}"
|
||||
|
||||
"""
|
||||
hmtnote \\
|
||||
annotate \\
|
||||
$vcf \\
|
||||
${prefix}_annotated.vcf \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
|
||||
END_VERSIONS
|
||||
"""
|
||||
stub:
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
touch ${prefix}_annotated.vcf
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
39
modules/hmtnote/meta.yml
Normal file
39
modules/hmtnote/meta.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: hmtnote
|
||||
description: Human mitochondrial variants annotation using HmtVar.
|
||||
keywords:
|
||||
- hmtnote mitochondria annotation
|
||||
tools:
|
||||
- hmtnote:
|
||||
description: Human mitochondrial variants annotation using HmtVar.
|
||||
homepage: https://github.com/robertopreste/HmtNote
|
||||
documentation: https://hmtnote.readthedocs.io/en/latest/usage.html
|
||||
tool_dev_url: None
|
||||
doi: "https://doi.org/10.1101/600619"
|
||||
licence: ["MIT"]
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
- vcf:
|
||||
type: file
|
||||
description: vcf file
|
||||
pattern: "*.vcf"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- vcf:
|
||||
type: file
|
||||
description: annotated vcf
|
||||
pattern: "*_annotated.vcf"
|
||||
|
||||
authors:
|
||||
- "@sysbiocoder"
|
|
@ -19,6 +19,7 @@ if ("$PROFILE" == "singularity") {
|
|||
} else {
|
||||
docker.enabled = true
|
||||
docker.userEmulation = true
|
||||
docker.runOptions = "--platform linux/x86_64"
|
||||
}
|
||||
|
||||
// Increase time available to build Conda environment
|
||||
|
|
|
@ -222,6 +222,10 @@ bedtools/sort:
|
|||
- modules/bedtools/sort/**
|
||||
- tests/modules/bedtools/sort/**
|
||||
|
||||
bedtools/split:
|
||||
- modules/bedtools/split/**
|
||||
- tests/modules/bedtools/split/**
|
||||
|
||||
bedtools/subtract:
|
||||
- modules/bedtools/subtract/**
|
||||
- tests/modules/bedtools/subtract/**
|
||||
|
@ -230,6 +234,10 @@ biobambam/bammarkduplicates2:
|
|||
- modules/biobambam/bammarkduplicates2/**
|
||||
- tests/modules/biobambam/bammarkduplicates2/**
|
||||
|
||||
biobambam/bammerge:
|
||||
- modules/biobambam/bammerge/**
|
||||
- tests/modules/biobambam/bammerge/**
|
||||
|
||||
biobambam/bamsormadup:
|
||||
- modules/biobambam/bamsormadup/**
|
||||
- tests/modules/biobambam/bamsormadup/**
|
||||
|
@ -966,6 +974,10 @@ hmmer/hmmsearch:
|
|||
- modules/hmmer/hmmsearch/**
|
||||
- tests/modules/hmmer/hmmsearch/**
|
||||
|
||||
hmtnote:
|
||||
- modules/hmtnote/**
|
||||
- tests/modules/hmtnote/**
|
||||
|
||||
homer/annotatepeaks:
|
||||
- modules/homer/annotatepeaks/**
|
||||
- tests/modules/homer/annotatepeaks/**
|
||||
|
|
17
tests/modules/bedtools/split/main.nf
Normal file
17
tests/modules/bedtools/split/main.nf
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { BEDTOOLS_SPLIT } from '../../../../modules/bedtools/split/main.nf'
|
||||
|
||||
workflow test_bedtools_split {
|
||||
|
||||
input = [
|
||||
[ id:'test' ], // meta map
|
||||
file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true)
|
||||
]
|
||||
|
||||
number_of_files = 2
|
||||
|
||||
BEDTOOLS_SPLIT ( input, number_of_files )
|
||||
}
|
5
tests/modules/bedtools/split/nextflow.config
Normal file
5
tests/modules/bedtools/split/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
10
tests/modules/bedtools/split/test.yml
Normal file
10
tests/modules/bedtools/split/test.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- name: bedtools split test_bedtools_split
|
||||
command: nextflow run ./tests/modules/bedtools/split -entry test_bedtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bedtools/split/nextflow.config
|
||||
tags:
|
||||
- bedtools
|
||||
- bedtools/split
|
||||
files:
|
||||
- path: output/bedtools/test.00001.bed
|
||||
md5sum: d58e5e46c2fcc3b8be5db0f023e93cb5
|
||||
- path: output/bedtools/test.00002.bed
|
||||
md5sum: 03caf952e9297a54620d2bbba8dc2823
|
30
tests/modules/biobambam/bammerge/main.nf
Normal file
30
tests/modules/biobambam/bammerge/main.nf
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { BIOBAMBAM_BAMMERGE } from '../../../../modules/biobambam/bammerge/main.nf'
|
||||
|
||||
workflow test_biobambam_bammerge_paired {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
[
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
]
|
||||
|
||||
BIOBAMBAM_BAMMERGE ( input )
|
||||
}
|
||||
|
||||
workflow test_biobambam_bammerge_single {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
[
|
||||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true),
|
||||
]
|
||||
]
|
||||
|
||||
BIOBAMBAM_BAMMERGE ( input )
|
||||
}
|
13
tests/modules/biobambam/bammerge/nextflow.config
Normal file
13
tests/modules/biobambam/bammerge/nextflow.config
Normal file
|
@ -0,0 +1,13 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
withName: BIOBAMBAM_BAMMERGE {
|
||||
ext.args = {[
|
||||
"md5=1",
|
||||
"md5filename=${meta.id}.md5",
|
||||
"index=1",
|
||||
"indexfilename=${meta.id}.bam.bai"
|
||||
].join(" ").trim()}
|
||||
}
|
||||
|
||||
}
|
25
tests/modules/biobambam/bammerge/test.yml
Normal file
25
tests/modules/biobambam/bammerge/test.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- name: biobambam bammerge test_biobambam_bammerge_paired
|
||||
command: nextflow run ./tests/modules/biobambam/bammerge -entry test_biobambam_bammerge_paired -c ./tests/config/nextflow.config -c ./tests/modules/biobambam/bammerge/nextflow.config
|
||||
tags:
|
||||
- biobambam/bammerge
|
||||
- biobambam
|
||||
files:
|
||||
- path: output/biobambam/test.bam
|
||||
md5sum: bc3d32ab6a54d1894ca7cc79387dec57
|
||||
- path: output/biobambam/test.bam.bai
|
||||
md5sum: b8ae542a37a73d79de1c15c765207c53
|
||||
- path: output/biobambam/test.md5
|
||||
md5sum: 31c59857990ceb392242136429e30243
|
||||
|
||||
- name: biobambam bammerge test_biobambam_bammerge_single
|
||||
command: nextflow run ./tests/modules/biobambam/bammerge -entry test_biobambam_bammerge_single -c ./tests/config/nextflow.config -c ./tests/modules/biobambam/bammerge/nextflow.config
|
||||
tags:
|
||||
- biobambam/bammerge
|
||||
- biobambam
|
||||
files:
|
||||
- path: output/biobambam/test.bam
|
||||
md5sum: 86185d3d6895a7722d3b3a09c6f91bfc
|
||||
- path: output/biobambam/test.bam.bai
|
||||
md5sum: 973680feb6bc73cd1051ea83c7219418
|
||||
- path: output/biobambam/test.md5
|
||||
md5sum: 244a9d1cbc6d74724285c80220e5e427
|
14
tests/modules/hmtnote/main.nf
Normal file
14
tests/modules/hmtnote/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { HMTNOTE } from '../../../modules/hmtnote/main.nf'
|
||||
|
||||
workflow test_hmtnote {
|
||||
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
HMTNOTE ( input)
|
||||
}
|
7
tests/modules/hmtnote/nextflow.config
Normal file
7
tests/modules/hmtnote/nextflow.config
Normal file
|
@ -0,0 +1,7 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
withName: HMTNOTE {
|
||||
ext.args = '--basic --variab'
|
||||
}
|
||||
}
|
6
tests/modules/hmtnote/test.yml
Normal file
6
tests/modules/hmtnote/test.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- name: hmtnote test_hmtnote
|
||||
command: nextflow run ./tests/modules/hmtnote -entry test_hmtnote -c ./tests/config/nextflow.config -c ./tests/modules/hmtnote/nextflow.config
|
||||
tags:
|
||||
- hmtnote
|
||||
files:
|
||||
- path: output/hmtnote/test_annotated.vcf
|
Loading…
Reference in a new issue