mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-03 04:52:09 -05:00
Merge pull request #1535 from matthdsm/tool/bamtools-split
This commit is contained in:
commit
a9e8dbbdec
4 changed files with 50 additions and 16 deletions
|
@ -2,10 +2,10 @@ process BAMTOOLS_SPLIT {
|
|||
tag "$meta.id"
|
||||
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 ?
|
||||
'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' :
|
||||
'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }"
|
||||
'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' :
|
||||
'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
|
@ -20,10 +20,14 @@ process BAMTOOLS_SPLIT {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def input_list = bam.collect{"-in $it"}.join(' ')
|
||||
"""
|
||||
bamtools \\
|
||||
merge \\
|
||||
$input_list \\
|
||||
| bamtools \\
|
||||
split \\
|
||||
-in $bam \\
|
||||
-stub $prefix \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
|
@ -23,7 +23,7 @@ input:
|
|||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: A BAM file to split
|
||||
description: A list of one or more BAM files to merge and then split
|
||||
pattern: "*.bam"
|
||||
|
||||
output:
|
||||
|
@ -43,3 +43,4 @@ output:
|
|||
|
||||
authors:
|
||||
- "@sguizard"
|
||||
- "@matthdsm"
|
||||
|
|
|
@ -2,13 +2,29 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf'
|
||||
include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_SINGLE } from '../../../../modules/bamtools/split/main.nf'
|
||||
include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_MULTIPLE } from '../../../../modules/bamtools/split/main.nf'
|
||||
|
||||
workflow test_bamtools_split {
|
||||
workflow test_bamtools_split_single_input {
|
||||
|
||||
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']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
|
||||
BAMTOOLS_SPLIT ( input )
|
||||
BAMTOOLS_SPLIT_SINGLE ( input )
|
||||
}
|
||||
|
||||
workflow test_bamtools_split_multiple {
|
||||
|
||||
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)
|
||||
]
|
||||
]
|
||||
|
||||
BAMTOOLS_SPLIT_MULTIPLE ( input )
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,23 @@
|
|||
- name: bamtools split test_bamtools_split
|
||||
command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config
|
||||
- name: bamtools split test_bamtools_split_single_input
|
||||
command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_single_input -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config
|
||||
tags:
|
||||
- bamtools/split
|
||||
- bamtools
|
||||
- bamtools/split
|
||||
files:
|
||||
- path: output/bamtools/test.paired_end.sorted.REF_chr22.bam
|
||||
- path: output/bamtools/test.REF_chr22.bam
|
||||
md5sum: b7dc50e0edf9c6bfc2e3b0e6d074dc07
|
||||
- path: output/bamtools/test.paired_end.sorted.REF_unmapped.bam
|
||||
- path: output/bamtools/test.REF_unmapped.bam
|
||||
md5sum: e0754bf72c51543b2d745d96537035fb
|
||||
- path: output/bamtools/versions.yml
|
||||
|
||||
- name: bamtools split test_bamtools_split_multiple
|
||||
command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_multiple -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config
|
||||
tags:
|
||||
- bamtools
|
||||
- bamtools/split
|
||||
files:
|
||||
- path: output/bamtools/test.REF_chr22.bam
|
||||
md5sum: 585675bea34c48ebe9db06a561d4b4fa
|
||||
- path: output/bamtools/test.REF_unmapped.bam
|
||||
md5sum: 16ad644c87b9471f3026bc87c98b4963
|
||||
- path: output/bamtools/versions.yml
|
||||
|
|
Loading…
Reference in a new issue