Skip to content

Commit

Permalink
Merge pull request #383 from emi80/master
Browse files Browse the repository at this point in the history
Add tests for the new '--match-mates' sort option
  • Loading branch information
pjotrp authored Jan 12, 2019
2 parents 3a61cbb + 903f62a commit a0b5718
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file added test/match_mates.bam
Binary file not shown.
14 changes: 14 additions & 0 deletions test/test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ testSortPicard() {
assertEquals "2d9af987d7aeaf3a38396870a2f30dca" `$sambamba $opts view -f unpack $outfn |$md5sum|cut -c 1-32`
}

testSortByNameMatchMates() {
outfn=$outdir/match_mates_nameSorted.bam
$sambamba $opts sort -t2 -n -M -m 300K test/match_mates.bam -o $outfn
assertEquals 0 $?
assertEquals "8a0b62e1ac85185c31cf66126c876217" `$sambamba $opts view -f unpack $outfn |$md5sum|cut -c 1-32`
}

testNaturalSortMatchMates() {
outfn=$outdir/match_mates_naturalSorted.bam
$sambamba $opts sort -t2 -N -M -m 300K test/match_mates.bam -o $outfn
assertEquals 0 $?
assertEquals "8a0b62e1ac85185c31cf66126c876217" `$sambamba $opts view -f unpack $outfn |$md5sum|cut -c 1-32`
}

testSlice() {
$sambamba $opts slice $sortedbam chr1 -o /dev/null
assertEquals 0 $?
Expand Down

0 comments on commit a0b5718

Please sign in to comment.