Get samtools idxstats tests passing

This commit is contained in:
drpatelh 2020-08-07 15:14:45 +01:00
parent 46e4d35ec3
commit 17b5f5ef3b
6 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1,70 @@
name: samtools_idxstats
description: Reports alignment summary statistics for a BAM/CRAM/SAM file
keywords:
- stats
- mapping
- counts
- chromosome
- bam
- sam
- cram
tools:
- samtools:
description: |
SAMtools is a set of utilities for interacting with and post-processing
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
These files are generated as output by short read aligners like BWA.
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:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- bai:
type: file
description: Index for BAM/CRAM/SAM file
pattern: "*.{bai,crai,sai}"
- 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 ]
- idxstats:
type: file
description: File containing samtools idxstats output
pattern: "*.{idxstats}"
- 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.bai

View file

@ -0,0 +1,19 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { SAMTOOLS_IDXSTATS } 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.sorted.bam.bai", checkIfExists: true) ]
SAMTOOLS_IDXSTATS ( 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
}
}

View file

@ -0,0 +1,2 @@
gi|170079663|ref|NC_010473.1| 4686137 20000 0
* 0 0 0