From 46e4d35ec3aee932d63eeb8a451bed975b139011 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Fri, 7 Aug 2020 15:12:03 +0100 Subject: [PATCH] Get samtools flagstat passing --- .../test/input/test.paired_end.sorted.bam | 1 + .../test/input/test.paired_end.sorted.bam.bai | 1 + software/samtools/flagstat/test/main.nf | 19 ++++++++++++++++++ .../samtools/flagstat/test/nextflow.config | 20 +++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 120000 software/samtools/flagstat/test/input/test.paired_end.sorted.bam create mode 120000 software/samtools/flagstat/test/input/test.paired_end.sorted.bam.bai create mode 100755 software/samtools/flagstat/test/main.nf create mode 100644 software/samtools/flagstat/test/nextflow.config diff --git a/software/samtools/flagstat/test/input/test.paired_end.sorted.bam b/software/samtools/flagstat/test/input/test.paired_end.sorted.bam new file mode 120000 index 00000000..af606d91 --- /dev/null +++ b/software/samtools/flagstat/test/input/test.paired_end.sorted.bam @@ -0,0 +1 @@ +../../../../../tests/data/bam/test.paired_end.sorted.bam \ No newline at end of file diff --git a/software/samtools/flagstat/test/input/test.paired_end.sorted.bam.bai b/software/samtools/flagstat/test/input/test.paired_end.sorted.bam.bai new file mode 120000 index 00000000..61a71557 --- /dev/null +++ b/software/samtools/flagstat/test/input/test.paired_end.sorted.bam.bai @@ -0,0 +1 @@ +../../../../../tests/data/bam/test.paired_end.sorted.bam.bai \ No newline at end of file diff --git a/software/samtools/flagstat/test/main.nf b/software/samtools/flagstat/test/main.nf new file mode 100755 index 00000000..f41a0d86 --- /dev/null +++ b/software/samtools/flagstat/test/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_FLAGSTAT } 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_FLAGSTAT ( input, [:] ) +} + +workflow { + test() +} diff --git a/software/samtools/flagstat/test/nextflow.config b/software/samtools/flagstat/test/nextflow.config new file mode 100644 index 00000000..44b62ed8 --- /dev/null +++ b/software/samtools/flagstat/test/nextflow.config @@ -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 + } +}