Skip to content

Commit a0b5718

Browse files
authored
Merge pull request #383 from emi80/master
Add tests for the new '--match-mates' sort option
2 parents 3a61cbb + 903f62a commit a0b5718

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/match_mates.bam

1.08 KB
Binary file not shown.

test/test_suite.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ testSortPicard() {
7575
assertEquals "2d9af987d7aeaf3a38396870a2f30dca" `$sambamba $opts view -f unpack $outfn |$md5sum|cut -c 1-32`
7676
}
7777

78+
testSortByNameMatchMates() {
79+
outfn=$outdir/match_mates_nameSorted.bam
80+
$sambamba $opts sort -t2 -n -M -m 300K test/match_mates.bam -o $outfn
81+
assertEquals 0 $?
82+
assertEquals "8a0b62e1ac85185c31cf66126c876217" `$sambamba $opts view -f unpack $outfn |$md5sum|cut -c 1-32`
83+
}
84+
85+
testNaturalSortMatchMates() {
86+
outfn=$outdir/match_mates_naturalSorted.bam
87+
$sambamba $opts sort -t2 -N -M -m 300K test/match_mates.bam -o $outfn
88+
assertEquals 0 $?
89+
assertEquals "8a0b62e1ac85185c31cf66126c876217" `$sambamba $opts view -f unpack $outfn |$md5sum|cut -c 1-32`
90+
}
91+
7892
testSlice() {
7993
$sambamba $opts slice $sortedbam chr1 -o /dev/null
8094
assertEquals 0 $?

0 commit comments

Comments
 (0)