1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-11-14 22:33:14 +00:00

Update BAM.sequence to return BioSequences.LongDNA{4}

Same principles apply as updating SAM.sequence
This commit is contained in:
Thomas A. Christensen II 2022-07-07 09:19:43 -05:00
parent 1660a24a0f
commit a7a76db3d4
Signed by: millironx
GPG key ID: 139C07724802BC5D

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)