Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Gaps added by reverse with BioSequence slices #356

Closed
timbitz opened this issue Dec 3, 2016 · 1 comment · Fixed by #357
Closed

Gaps added by reverse with BioSequence slices #356

timbitz opened this issue Dec 3, 2016 · 1 comment · Fixed by #357
Assignees

Comments

@timbitz
Copy link
Member

timbitz commented Dec 3, 2016

I stumbled across the following behavior which I wasn't expecting, I narrowed it down to a length dependent behavior from slices with reverse which I think might not be returning a copy as it should?

julia> using Bio.Seq

julia> seq = DNASequence("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
32nt DNA Sequence:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

julia> reverse(seq[(length(seq)-9):length(seq)])
10nt DNA Sequence:
AAAAAAAAAA

julia> seq = DNASequence("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
33nt DNA Sequence:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

julia> reverse(seq[(length(seq)-9):length(seq)])
10nt DNA Sequence:
A---------

julia> reverse(copy(seq[(length(seq)-9):length(seq)]))
10nt DNA Sequence:
AAAAAAAAAA

julia> Pkg.status()
 - Bio                           0.4.2
@bicycle1885
Copy link
Member

Thank you. I'll take a look at it as soon as possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants