File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 3.0.1]
8+ ### Removed
9+
10+ ### Added
11+
12+ ### Changed
13+ - Fixed a bug in ` iscanonical ` .
14+
715## [ 3.0]
816### Removed
917- Removed ` unsafe_setindex! ` . Instead, use normal setindex with ` @inbounds ` .
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ two i.e. `canonical_seq < other_seq`.
115115function iscanonical (seq:: NucleotideSeq )
116116 i = 1
117117 j = lastindex (seq)
118- @inbounds while i < j
118+ @inbounds while i <= j
119119 f = seq[i]
120120 r = complement (seq[j])
121121 f < r && return true
Original file line number Diff line number Diff line change 126126 seq = SimpleSeq (" CGAU" )
127127 canonical! (seq)
128128 @test seq == SimpleSeq (" AUCG" )
129+
130+ @test iscanonical (SimpleSeq (" UCA" ))
131+ @test ! iscanonical (SimpleSeq (" UGA" ))
129132end
130133
131134@testset " Ispalindromic" begin
Original file line number Diff line number Diff line change 7575 @test isrepetitive (aa " PGQQ" , 2 )
7676 @test ! isrepetitive (aa " PPQQ" , 3 )
7777 @test isrepetitive (aa " PPPQQ" , 3 )
78+
79+ # iscanonical
80+ @test iscanonical (dna " TCA" )
81+ @test ! iscanonical (dna " TGA" )
7882end
You can’t perform that action at this time.
0 commit comments