Skip to content

Commit

Permalink
Clean up code format
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarousseau committed Mar 29, 2024
1 parent 800f795 commit f28be40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/samtools/idxstats/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ argument_groups:
arguments:
- name: "--output"
type: file
description: File containing samtools stats output in tab-delimited format.
description: |
File containing samtools stats output in tab-delimited format.
required: true
must_exist: false
example: output.idxstats
Expand Down
4 changes: 1 addition & 3 deletions src/samtools/idxstats/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@

set -e

output_file="$par_output"

samtools idxstats "$par_bam" > "$output_file"
samtools idxstats "$par_bam" > "$par_output"
7 changes: 5 additions & 2 deletions src/samtools/idxstats/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@ echo ">>> Testing $meta_functionality_name with singletons in the input"
--output "$test_dir/test.paired_end.sorted.idxstats"

echo ">>> Checking whether output exists"
[ ! -f "$test_dir/test.paired_end.sorted.idxstats" ] && echo "File 'test.paired_end.sorted.idxstats' does not exist!" && exit 1
[ ! -f "$test_dir/test.paired_end.sorted.idxstats" ] && \
echo "File 'test.paired_end.sorted.idxstats' does not exist!" && exit 1

echo ">>> Checking whether output is non-empty"
[ ! -s "$test_dir/test.paired_end.sorted.idxstats" ] && echo "File 'test.paired_end.sorted.idxstats' is empty!" && exit 1
[ ! -s "$test_dir/test.paired_end.sorted.idxstats" ] && \
echo "File 'test.paired_end.sorted.idxstats' is empty!" && exit 1

echo ">>> Checking whether output is correct"
diff "$test_dir/test.paired_end.sorted.idxstats" "$test_dir/test_ref.paired_end.sorted.idxstats" || \
(echo "Output file test.paired_end.sorted.idxstats does not match expected output" && exit 1)

rm "$test_dir/test.paired_end.sorted.idxstats"

############################################################################################

echo "All tests succeeded!"
exit 0

0 comments on commit f28be40

Please sign in to comment.