Skip to content

Commit

Permalink
first basic test working & changed source container for a more recent…
Browse files Browse the repository at this point in the history
… version
  • Loading branch information
emmarousseau committed Mar 22, 2024
1 parent 8e3d5c5 commit 7846fe6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/samtools/flagstat/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 4 additions & 2 deletions src/samtools/flagstat/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

set -e

output_file="$par_output"

samtools flagstat \
"$par_input_bam" \
> "$par_output_stats"
"$par_bam" \
> "$output_file"

6 changes: 3 additions & 3 deletions src/samtools/flagstat/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 7846fe6

Please sign in to comment.