1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-11-23 10:19:56 +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 fail-fast: false
matrix: matrix:
julia-version: julia-version:
- '1.0' # LTS
- '1.6' # LTS - '1.6' # LTS
- '1' - '1'
julia-arch: [x64, x86] julia-arch: [x64, x86]

View file

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

View file

@ -505,7 +505,7 @@ function hastemplength(record::Record)
end end
""" """
sequence(record::Record)::BioSequences.LongDNASeq sequence(record::Record)::BioSequences.LongDNA{4}
Get the segment sequence of `record`. Get the segment sequence of `record`.
""" """
@ -522,7 +522,7 @@ function sequence(record::Record)
x = unsafe_load(src, i) x = unsafe_load(src, i)
data[i] = (x & 0x0f0f0f0f0f0f0f0f) << 4 | (x & 0xf0f0f0f0f0f0f0f0) >> 4 data[i] = (x & 0x0f0f0f0f0f0f0f0f) << 4 | (x & 0xf0f0f0f0f0f0f0f0) >> 4
end end
return BioSequences.LongDNASeq(data, 1:seqlen, false) return BioSequences.LongDNA{4}(data, UInt(seqlen))
end end
function hassequence(record::Record) function hassequence(record::Record)

View file

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