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

BioSequences v3 changed LongDNASeq to LongDNA{N}. We can't assume that
there aren't ambiguous nucleotides in a SAM file, so use the larger
LongDNA variant. The method signatures are also simplified, so simplify
their calls, accordingly.
feature/BioAlignmentsv2.2
parent e560681afa
commit 1660a24a0f
Signed by: millironx
GPG Key ID: 139C07724802BC5D

@ -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

Loading…
Cancel
Save