bump version, add merge before split

This commit is contained in:
Matthias De Smet 2022-04-19 15:05:02 +02:00
parent c7def8707b
commit 6723ca7f90
2 changed files with 22 additions and 8 deletions

View file

@ -2,13 +2,14 @@ process BAMTOOLS_SPLIT {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_low'
conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) conda (params.enable_conda ? "bioconda::bamtools=2.5.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' :
'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }"
input: input:
tuple val(meta), path(bam) tuple val(meta), path(bam)
path(bam_list)
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
@ -19,12 +20,19 @@ process BAMTOOLS_SPLIT {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def args2 = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def input_list = bam.collect{"-in $it"}.join(' ')
if (bam_list) {
input += " -list $bam_list"
}
""" """
bamtools \\ bamtools merge \\
split \\ ${input_list} \\
-in $bam \\ $args \\
$args bamtools split \\
$args2
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -23,8 +23,13 @@ input:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- bam: - bam:
type: file type: file
description: A BAM file to split description: A list of BAM files to merge and then split
pattern: "*.bam" pattern: "*.bam"
- bam_list:
type: file
description: |
Input file containing bam files to merge before splitting,
one line per file
output: output:
- meta: - meta:
@ -43,3 +48,4 @@ output:
authors: authors:
- "@sguizard" - "@sguizard"
- "@matthdsm"