Add tests for mergesamfiles

This commit is contained in:
drpatelh 2020-08-07 16:39:16 +01:00
parent 3547b64eab
commit 08723c9d61
6 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,61 @@
name: picard_mergesamfiles
description: Merges multiple BAM files into a single file
keywords:
- merge
- alignment
- bam
- sam
tools:
- picard:
description: |
A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS)
data and formats such as SAM/BAM/CRAM and VCF.
homepage: https://broadinstitute.github.io/picard/
documentation: https://broadinstitute.github.io/picard/
params:
- outdir:
type: string
description: |
The pipeline's output directory. By default, the module will
output files into `$params.outdir/<SOFTWARE>`
- publish_dir_mode:
type: string
description: |
Value for the Nextflow `publishDir` mode parameter.
Available: symlink, rellink, link, copy, copyNoFollow, move.
- conda:
type: boolean
description: |
Run the module with Conda using the software specified
via the `conda` directive
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: List of BAM files
pattern: "*.{bam}"
- options:
type: map
description: |
Groovy Map containing module options for passing command-line arguments and
output file paths.
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}"
- version:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors:
- "@drpatelh"

View file

@ -0,0 +1 @@
../../../../../tests/data/bam/test.paired_end.sorted.bam

View file

@ -0,0 +1 @@
../../../../../tests/data/bam/test.paired_end.sorted.bam

View file

@ -0,0 +1,19 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { PICARD_MERGESAMFILES } from '../main.nf'
workflow test {
def input = []
input = [ [ id:'test', single_end:false ], // meta map
[ file("${baseDir}/input/test.paired_end.sorted.bam", checkIfExists: true),
file("${baseDir}/input/test.paired_end.COPY.sorted.bam", checkIfExists: true), ] ]
PICARD_MERGESAMFILES ( input, [:] )
}
workflow {
test()
}

View file

@ -0,0 +1,20 @@
params {
outdir = "output/"
publish_dir_mode = "copy"
conda = false
}
profiles {
conda {
params.conda = true
}
docker {
docker.enabled = true
docker.runOptions = '-u \$(id -u):\$(id -g)'
}
singularity {
singularity.enabled = true
singularity.autoMounts = true
}
}