mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
add module: biobambam/bammerge
This commit is contained in:
parent
c6fae2ae6d
commit
af69ea749d
7 changed files with 115 additions and 0 deletions
37
modules/biobambam/bammerge/main.nf
Normal file
37
modules/biobambam/bammerge/main.nf
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
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("*.bam.bai") ,optional:true, emit: bam_index
|
||||||
|
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: \$(echo \$(bammerge --version 2>&1) | sed 's/^This is biobambam2 version //; s/..biobambam2 is .*\$//' )
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
42
modules/biobambam/bammerge/meta.yml
Normal file
42
modules/biobambam/bammerge/meta.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: biobambam_bamsort
|
||||||
|
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: "*.{bai}"
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
authors:
|
||||||
|
- "@matthdsm"
|
|
@ -19,6 +19,7 @@ if ("$PROFILE" == "singularity") {
|
||||||
} else {
|
} else {
|
||||||
docker.enabled = true
|
docker.enabled = true
|
||||||
docker.userEmulation = true
|
docker.userEmulation = true
|
||||||
|
docker.runOptions = "--platform linux/x86_64"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increase time available to build Conda environment
|
// Increase time available to build Conda environment
|
||||||
|
|
|
@ -230,6 +230,10 @@ biobambam/bammarkduplicates2:
|
||||||
- modules/biobambam/bammarkduplicates2/**
|
- modules/biobambam/bammarkduplicates2/**
|
||||||
- tests/modules/biobambam/bammarkduplicates2/**
|
- tests/modules/biobambam/bammarkduplicates2/**
|
||||||
|
|
||||||
|
biobambam/bammerge:
|
||||||
|
- modules/biobambam/bammerge/**
|
||||||
|
- tests/modules/biobambam/bammerge/**
|
||||||
|
|
||||||
biobambam/bamsormadup:
|
biobambam/bamsormadup:
|
||||||
- modules/biobambam/bamsormadup/**
|
- modules/biobambam/bamsormadup/**
|
||||||
- tests/modules/biobambam/bamsormadup/**
|
- tests/modules/biobambam/bamsormadup/**
|
||||||
|
|
18
tests/modules/biobambam/bammerge/main.nf
Normal file
18
tests/modules/biobambam/bammerge/main.nf
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { BIOBAMBAM_BAMMERGE } from '../../../../modules/biobambam/bammerge/main.nf'
|
||||||
|
|
||||||
|
workflow test_biobambam_bammerge {
|
||||||
|
|
||||||
|
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 )
|
||||||
|
}
|
5
tests/modules/biobambam/bammerge/nextflow.config
Normal file
5
tests/modules/biobambam/bammerge/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
8
tests/modules/biobambam/bammerge/test.yml
Normal file
8
tests/modules/biobambam/bammerge/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: biobambam bammerge test_biobambam_bammerge
|
||||||
|
command: nextflow run ./tests/modules/biobambam/bammerge -entry test_biobambam_bammerge -c ./tests/config/nextflow.config -c ./tests/modules/biobambam/bammerge/nextflow.config
|
||||||
|
tags:
|
||||||
|
- biobambam/bammerge
|
||||||
|
- biobambam
|
||||||
|
files:
|
||||||
|
- path: output/biobambam/test.bam
|
||||||
|
md5sum: 676157f300c774a58dd3b7b554e00f11
|
Loading…
Reference in a new issue