mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
Add samtools index tests
This commit is contained in:
parent
17b5f5ef3b
commit
0287cad1f8
5 changed files with 84 additions and 23 deletions
|
@ -1,7 +1,10 @@
|
|||
name: samtools index
|
||||
description: index a BAM or CRAM file
|
||||
name: samtools_index
|
||||
description: Index SAM/BAM/CRAM file
|
||||
keywords:
|
||||
- index
|
||||
- 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:
|
||||
-
|
||||
- index:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bai:
|
||||
type: file
|
||||
description: BAM or CRAM index file
|
||||
pattern: "*.{bai}"
|
||||
description: BAM/CRAM/SAM index file
|
||||
pattern: "*.{bai,crai,sai}"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
authors:
|
||||
- "@drpatelh"
|
||||
- "@ewels"
|
||||
|
|
1
software/samtools/index/test/input/test.paired_end.sorted.bam
Symbolic link
1
software/samtools/index/test/input/test.paired_end.sorted.bam
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../../tests/data/bam/test.paired_end.sorted.bam
|
23
software/samtools/index/test/main.nf
Normal file → Executable file
23
software/samtools/index/test/main.nf
Normal file → Executable 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_INDEX } 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) ]
|
||||
|
||||
SAMTOOLS_INDEX ( input, [:] )
|
||||
}
|
||||
|
||||
workflow {
|
||||
test()
|
||||
}
|
||||
|
|
|
@ -1,2 +1,20 @@
|
|||
|
||||
params {
|
||||
outdir = "output/"
|
||||
publish_dir_mode = "copy"
|
||||
conda = false
|
||||
}
|
||||
|
||||
profiles {
|
||||
conda {
|
||||
params.conda = true
|
||||
}
|
||||
docker {
|
||||
docker.enabled = true
|
||||
params.outdir = './results'
|
||||
docker.runOptions = '-u \$(id -u):\$(id -g)'
|
||||
}
|
||||
singularity {
|
||||
singularity.enabled = true
|
||||
singularity.autoMounts = true
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue