Add samtools sort

This commit is contained in:
drpatelh 2020-08-07 15:21:28 +01:00
parent 0287cad1f8
commit d5b16db27d
5 changed files with 84 additions and 23 deletions

View file

@ -1,7 +1,10 @@
name: samtools sort
description: Sort a BAM or CRAM file
name: samtools_sort
description: Sort SAM/BAM/CRAM file
keywords:
- sort
- bam
- sam
- cram
tools:
- samtools:
description: |
@ -11,17 +14,51 @@ tools:
homepage: http://www.htslib.org/
documentation: hhttp://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
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:
-
- input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Input BAM or CRAM file
pattern: "*.{bam,cram}"
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- options:
type: map
description: |
Groovy Map containing module options for passing command-line arguments and
output file paths.
output:
-
- sorted_file:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Sorted BAM or CRAM file
pattern: "*.{bam,cram}"
description: Sorted BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- version:
type: file
description: File containing software version
pattern: "*.{version.txt}"
authors:
- "@drpatelh"
- "@ewels"

View file

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

23
software/samtools/sort/test/main.nf Normal file → Executable file
View file

@ -1,13 +1,18 @@
#!/usr/bin/env nextflow
echo true
cheers = Channel.from 'Bonjour', 'Ciao', 'Hello', 'Hola'
nextflow.enable.dsl = 2
process sayHello {
input:
val x from cheers
script:
"""
echo '$x world!'
"""
include { SAMTOOLS_SORT } from '../main.nf'
workflow test {
def input = []
input = [ [ id:'test', single_end:false ], // meta map
file("${baseDir}/input/test.paired_end.name.sorted.bam", checkIfExists: true) ]
SAMTOOLS_SORT ( input, [:] )
}
workflow {
test()
}

View file

@ -1,2 +1,20 @@
docker.enabled = true
params.outdir = './results'
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
}
}

Binary file not shown.