mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-11-14 22:33:14 +00:00
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.
This commit is contained in:
parent
e560681afa
commit
1660a24a0f
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue