1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-11-23 02:09:55 +00:00

Merge pull request #48 from MillironX/feature/BioAlignmentsv2.2

Upgrade BioAlignments to v2.2 & BioSequences to v3
This commit is contained in:
Ciarán O'Mara 2022-08-15 15:30:19 +10:00 committed by GitHub
commit d37e9a04d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 9 deletions

View file

@ -13,7 +13,6 @@ jobs:
fail-fast: false
matrix:
julia-version:
- '1.0' # LTS
- '1.6' # LTS
- '1'
julia-arch: [x64, x86]

View file

@ -17,13 +17,13 @@ TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
[compat]
Automa = "0.7, 0.8"
BGZFStreams = "0.3"
BioAlignments = "2"
BioAlignments = "2.2"
BioGenerics = "0.1"
BioSequences = "2.0.4"
BioSequences = "3"
GenomicFeatures = "2"
Indexes = "0.1"
TranscodingStreams = "0.6, 0.7, 0.8, 0.9"
julia = "1"
julia = "1.6"
[extras]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

View file

@ -91,7 +91,7 @@ function Base.empty!(record::Record)
record.tlen = 0
#Note: data will be overwritten and indexed using data_size.
return record
end
@ -505,7 +505,7 @@ function hastemplength(record::Record)
end
"""
sequence(record::Record)::BioSequences.LongDNASeq
sequence(record::Record)::BioSequences.LongDNA{4}
Get the segment sequence of `record`.
"""
@ -522,7 +522,7 @@ function sequence(record::Record)
x = unsafe_load(src, i)
data[i] = (x & 0x0f0f0f0f0f0f0f0f) << 4 | (x & 0xf0f0f0f0f0f0f0f0) >> 4
end
return BioSequences.LongDNASeq(data, 1:seqlen, false)
return BioSequences.LongDNA{4}(data, UInt(seqlen))
end
function hassequence(record::Record)

View file

@ -387,7 +387,7 @@ function hastemplength(record::Record)
end
"""
sequence(record::Record)::BioSequences.LongDNASeq
sequence(record::Record)::BioSequences.LongDNA{4}
Get the segment sequence of `record`.
"""
@ -398,7 +398,7 @@ function sequence(record::Record)
return nothing
end
seqlen = length(record.seq)
ret = BioSequences.LongDNASeq(seqlen)
ret = BioSequences.LongDNA{4}(undef, seqlen)
copyto!(ret, 1, record.data, first(record.seq), seqlen)
return ret
end