mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-12-23 21:28:18 +00:00
✅ Enhanced unit test for rightposition (#37)
Added additional tests for SAM.Record and BAM.Record for `rightposition` (and implicitly `alignlength`).
This commit is contained in:
parent
8d14563f9d
commit
6a33ac06a7
1 changed files with 8 additions and 0 deletions
|
@ -151,6 +151,10 @@ end
|
|||
@test eof(reader)
|
||||
close(reader)
|
||||
|
||||
# rightposition (also implicitly alignlength)
|
||||
records = collect(open(SAM.Reader, joinpath(samdir, "ce#5b.sam")))
|
||||
@test SAM.rightposition(records[6]) == rightposition(records[6]) == 83
|
||||
|
||||
# iterator
|
||||
@test length(collect(open(SAM.Reader, joinpath(samdir, "ce#1.sam")))) == 1
|
||||
@test length(collect(open(SAM.Reader, joinpath(samdir, "ce#2.sam")))) == 2
|
||||
|
@ -308,6 +312,10 @@ end
|
|||
@test record.tlen == new_record.tlen
|
||||
@test record.data == new_record.data
|
||||
|
||||
# rightposition (also implicitly alignlength)
|
||||
records = collect(open(BAM.Reader, joinpath(bamdir, "ce#5b.bam")))
|
||||
@test BAM.rightposition(records[6]) == rightposition(records[6]) == 83
|
||||
|
||||
# iterator
|
||||
@test length(collect(open(BAM.Reader, joinpath(bamdir, "ce#1.bam")))) == 1
|
||||
@test length(collect(open(BAM.Reader, joinpath(bamdir, "ce#2.bam")))) == 2
|
||||
|
|
Loading…
Reference in a new issue