mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-18 10:56:13 -05: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
|
name: samtools_index
|
||||||
description: index a BAM or CRAM file
|
description: Index SAM/BAM/CRAM file
|
||||||
keywords:
|
keywords:
|
||||||
- index
|
- index
|
||||||
|
- bam
|
||||||
|
- sam
|
||||||
|
- cram
|
||||||
tools:
|
tools:
|
||||||
- samtools:
|
- samtools:
|
||||||
description: |
|
description: |
|
||||||
|
@ -11,17 +14,51 @@ tools:
|
||||||
homepage: http://www.htslib.org/
|
homepage: http://www.htslib.org/
|
||||||
documentation: hhttp://www.htslib.org/doc/samtools.html
|
documentation: hhttp://www.htslib.org/doc/samtools.html
|
||||||
doi: 10.1093/bioinformatics/btp352
|
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:
|
||||||
- input:
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
description: Input BAM or CRAM file
|
description: BAM/CRAM/SAM file
|
||||||
pattern: "*.{bam,cram}"
|
pattern: "*.{bam,cram,sam}"
|
||||||
|
- options:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing module options for passing command-line arguments and
|
||||||
|
output file paths.
|
||||||
output:
|
output:
|
||||||
-
|
- meta:
|
||||||
- index:
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- bai:
|
||||||
type: file
|
type: file
|
||||||
description: BAM or CRAM index file
|
description: BAM/CRAM/SAM index file
|
||||||
pattern: "*.{bai}"
|
pattern: "*.{bai,crai,sai}"
|
||||||
|
- version:
|
||||||
|
type: file
|
||||||
|
description: File containing software version
|
||||||
|
pattern: "*.{version.txt}"
|
||||||
authors:
|
authors:
|
||||||
|
- "@drpatelh"
|
||||||
- "@ewels"
|
- "@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
|
#!/usr/bin/env nextflow
|
||||||
echo true
|
|
||||||
|
|
||||||
cheers = Channel.from 'Bonjour', 'Ciao', 'Hello', 'Hola'
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
process sayHello {
|
include { SAMTOOLS_INDEX } from '../main.nf'
|
||||||
input:
|
|
||||||
val x from cheers
|
workflow test {
|
||||||
script:
|
|
||||||
"""
|
def input = []
|
||||||
echo '$x world!'
|
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 @@
|
||||||
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.
Loading…
Add table
Reference in a new issue