Skip to content

Commit ed08737

Browse files
authored
Merge pull request #72 from CiaranOMara/develop
- Increments BioSequences compatibility to v3. - Increments BioSymbols compatibility to v5. - Updates doctests. - Drops support for julia less than v1.6.
2 parents 4045711 + 8125f96 commit ed08737

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
version:
16-
- '1.0'
1716
- '1.6'
1817
- '1'
1918
- 'nightly'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2020
- *master* set as the main development branch (#49, #50)
2121
- Updated chat links (#ebea200c)
2222
- Expanded test matrix, adding julia v1.6 (#77)
23+
- Incremented BioSequences compatibility to v3 (#72)
24+
- Incremented BioSymbols compatibility to v5 (#72)
25+
- Adjusted test matrix for minimum compatibility (#72)
26+
- Updated doctests (#72)
2327

2428
### Removed
2529
- :exclamation: Reverted the use of *BioJulia* registry,
2630
the package switched to [General Julia Registry](https://github.com/JuliaRegistries/General) (#48)
2731
- :exclamation: Removed Gitter chat links (#ebea200c)
32+
- :exclamation: Dropped support for julia less than v1.6 (#72)
2833

2934
### Fixed
3035
- Doctests (#78)

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1212

1313
[compat]
1414
BioGenerics = "0.1"
15-
BioSequences = "2"
16-
BioSymbols = "4"
15+
BioSequences = "3"
16+
BioSymbols = "5"
1717
IntervalTrees = "1"
1818
julia = "1"
1919

docs/src/pairalign.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ julia> s2 = dna"ACCTGGTATGATAGCG";
7474
julia> scoremodel = AffineGapScoreModel(EDNAFULL, gap_open=-5, gap_extend=-1);
7575
7676
julia> res = pairalign(GlobalAlignment(), s1, s2, scoremodel) # run pairwise alignment
77-
PairwiseAlignmentResult{Int64, BioSequences.LongDNASeq, BioSequences.LongDNASeq}:
77+
PairwiseAlignmentResult{Int64, BioSequences.LongSequence{BioSequences.DNAAlphabet{4}}, BioSequences.LongSequence{BioSequences.DNAAlphabet{4}}}:
7878
score: 13
7979
seq: 0 -CCTAGG------AGGG 10
8080
||| || || |
@@ -85,7 +85,7 @@ julia> score(res) # get the achieved score of this alignment
8585
13
8686
8787
julia> aln = alignment(res)
88-
PairwiseAlignment{BioSequences.LongDNASeq, BioSequences.LongDNASeq}:
88+
PairwiseAlignment{BioSequences.LongSequence{BioSequences.DNAAlphabet{4}}, BioSequences.LongSequence{BioSequences.DNAAlphabet{4}}}:
8989
seq: 0 -CCTAGG------AGGG 10
9090
||| || || |
9191
ref: 1 ACCT-GGTATGATAGCG 16
@@ -126,11 +126,11 @@ julia> collect(aln) # pairwise alignment is iterable
126126
(DNA_G, DNA_C)
127127
(DNA_G, DNA_G)
128128
129-
julia> LongDNASeq([x for (x, _) in aln]) # create aligned `s1` with gaps
129+
julia> LongDNA{4}([x for (x, _) in aln]) # create aligned `s1` with gaps
130130
17nt DNA Sequence:
131131
-CCTAGG------AGGG
132132
133-
julia> LongDNASeq([y for (_, y) in aln]) # create aligned `s2` with gaps
133+
julia> LongDNA{4}([y for (_, y) in aln]) # create aligned `s2` with gaps
134134
17nt DNA Sequence:
135135
ACCT-GGTATGATAGCG
136136

src/submat.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ end
137137

138138
# Return the row/column index of `nt`.
139139
function index(nt::BioSymbols.NucleicAcid)
140-
return convert(Int, nt)
140+
return reinterpret(Int8, nt)
141141
end
142142

143143
# Return the row/column index of `aa`.
144144
function index(aa::BioSymbols.AminoAcid)
145-
return convert(Int, aa) + 1
145+
return reinterpret(Int8, aa) + 1
146146
end
147147

148148

test/runtests.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,15 +1012,12 @@ end
10121012
seq2 = aa"EPSHPKAVSPTETKRCPTEKVQHLPVSAPPKITQFLKAEASKEIAKLTCVVESSVLRA"
10131013
model = AffineGapScoreModel(BLOSUM62, gap_open=-10, gap_extend=-1)
10141014
aln = alignment(pairalign(GlobalAlignment(), seq1, seq2, model))
1015-
# julia 1.6+ uses shorter type aliases when printing types
1016-
seqtype = VERSION >= v"1.6" ?
1017-
"BioSequences.LongAminoAcidSeq" :
1018-
"BioSequences.LongSequence{BioSequences.AminoAcidAlphabet}"
1015+
seqtype = "BioSequences.LongAA"
10191016
buf = IOBuffer()
10201017
show(buf, MIME"text/plain"(), aln)
10211018
@test String(take!(buf)) ==
10221019
"""
1023-
PairwiseAlignment{$(seqtype),$(VERSION >= v"1.6" ? " " : "")$(seqtype)}:
1020+
PairwiseAlignment{$seqtype, $seqtype}:
10241021
seq: 1 EPVTSHPKAVSPTETK--PTEKGQHLPVSAPPKITQSLKAEASKDIAKLTCAVESSALCA 58
10251022
|| |||||||||||| |||| ||||||||||||| ||||||| |||||| |||| | |
10261023
ref: 1 EP--SHPKAVSPTETKRCPTEKVQHLPVSAPPKITQFLKAEASKEIAKLTCVVESSVLRA 58
@@ -1046,7 +1043,7 @@ end
10461043
buf = IOBuffer()
10471044
print(buf, (aln,))
10481045
@test String(take!(buf)) == (
1049-
"""(PairwiseAlignment{$seqtype,$(VERSION >= v"1.6" ? " " : "")$(seqtype)}""" *
1046+
"""(PairwiseAlignment{$seqtype, $seqtype}""" *
10501047
"""(lengths=(58, 58)/60),)"""
10511048
)
10521049
# Result from EMBOSS Needle:

0 commit comments

Comments
 (0)