Skip to content

Commit

Permalink
update changelog, add one test
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarousseau committed May 5, 2024
1 parent 9577321 commit 48cb40b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- `samtools/samtools_index`: Index SAM/BAM/CRAM files (PR #35).
- `samtools/samtools_sort`: Sort SAM/BAM/CRAM files (PR #36).
- `samtools/samtools_stats`: Reports alignment summary statistics for a BAM file (PR #39).
- `samtools/samtools_view`: Views and converts SAM/BAM/CRAM files (PR #45).

## MAJOR CHANGES

Expand Down
7 changes: 4 additions & 3 deletions src/samtools/samtools_view/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,19 @@ argument_groups:
alternatives: -q
type: integer
description: |
Skip alignments with MAPQ smaller than INT [0].
Skip alignments with MAPQ smaller than INT.
default: 0
- name: --library
alternatives: -l
type: string
description: |
Only output alignments in library STR [null].
Only output alignments in library STR.
default: null
- name: --min_qlen
alternatives: -m
type: integer
description: |
Only output alignments with number of CIGAR bases consuming query sequence ≥ INT [0]
Only output alignments with number of CIGAR bases consuming query sequence ≥ INT.
default: 0
- name: --expr
alternatives: -e
Expand Down
21 changes: 20 additions & 1 deletion src/samtools/samtools_view/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,25 @@ diff "$temp_dir/a.count" "$test_dir/a.count" || \

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

echo ">>> All test passed successfully"
echo ">>> Test 4: ${meta_functionality_name} including only the forward reads from read pairs"

"$meta_executable" \
--output "$temp_dir/a.forward" \
--excl_flags "147" \
--input "$test_dir/a.sam"

echo ">>> Checking whether output exists"
[ ! -f "$temp_dir/a.forward" ] && echo "File 'a.forward' does not exist!" && exit 1

echo ">>> Checking whether output is non-empty"
[ ! -s "$temp_dir/a.forward" ] && echo "File 'a.forward' is empty!" && exit 1

echo ">>> Checking whether output is correct"
diff "$temp_dir/a.forward" "$test_dir/a.forward" || \
(echo "Output file a.forward does not match expected output" && exit 1)

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

echo ">>> All test passed successfully"
rm -rf "${temp_dir}"
exit 0

0 comments on commit 48cb40b

Please sign in to comment.