From 7846fe69c32532a8759219781005f62c670a950e Mon Sep 17 00:00:00 2001 From: emmarousseau Date: Fri, 22 Mar 2024 11:14:47 +0100 Subject: [PATCH] first basic test working & changed source container for a more recent version --- src/samtools/flagstat/config.vsh.yaml | 2 +- src/samtools/flagstat/script.sh | 6 ++++-- src/samtools/flagstat/test.sh | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/samtools/flagstat/config.vsh.yaml b/src/samtools/flagstat/config.vsh.yaml index bf80f418..b1a81d4d 100644 --- a/src/samtools/flagstat/config.vsh.yaml +++ b/src/samtools/flagstat/config.vsh.yaml @@ -40,7 +40,7 @@ test_resources: path: test_data engines: - type: docker - image: quay.io/biocontainers/samtools:1.19.2--h50ea8bc_1 + image: quay.io/biocontainers/samtools:1.3.1--h9071d68_10 setup: - type: docker run: | diff --git a/src/samtools/flagstat/script.sh b/src/samtools/flagstat/script.sh index 16263079..1d7c8e11 100644 --- a/src/samtools/flagstat/script.sh +++ b/src/samtools/flagstat/script.sh @@ -5,7 +5,9 @@ set -e +output_file="$par_output" + samtools flagstat \ - "$par_input_bam" \ - > "$par_output_stats" + "$par_bam" \ + > "$output_file" \ No newline at end of file diff --git a/src/samtools/flagstat/test.sh b/src/samtools/flagstat/test.sh index 80fda0f5..1da36e2b 100644 --- a/src/samtools/flagstat/test.sh +++ b/src/samtools/flagstat/test.sh @@ -8,14 +8,14 @@ echo ">>> Testing $meta_functionality_name" --output "$meta_resources_dir/test_data/chr19.flagstat" echo ">>> Checking whether output exists" -[ ! -f "test_data/chr19.flagstat" ] && echo "File 'chr19.flagstat' does not exist!" && exit 1 +[ ! -f "$meta_resources_dir/test_data/chr19.flagstat" ] && echo "File 'chr19.flagstat' does not exist!" && exit 1 echo ">>> Checking whether output is non-empty" -[ ! -s "test_data/chr19.flagstat" ] && echo "File 'chr19.flagstat' is empty!" && exit 1 +[ ! -s "$meta_resources_dir/test_data/chr19.flagstat" ] && echo "File 'chr19.flagstat' is empty!" && exit 1 echo ">>> Checking whether output is correct" diff "$meta_resources_dir/test_data/chr19.flagstat" "$meta_resources_dir/test_data/chr19_ref.flagstat" || \ - (echo "Output does not match expected output." && exit 1) + (echo "Output file chr19.flagstat does not match expected output" && exit 1) rm "$meta_resources_dir/test_data/chr19.flagstat"