-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
findnext, findprev broken ... possible to add findall? #215
Comments
I have a feeling you are on a pre v3 version of BioSequences. This line |
Julia v 1.7.1 after a package update the status remains the same. |
On a 1.7 install on my machine I can pkg add v3, is it possible you're working in a project or setup where the BioSequences version is being kept 2.x for some compatibility or dependency reason? |
Thank you for the help. |
Expected Behavior
julia> seq = dna"AGAGAGAGA"
9nt DNA Sequence:
AGAGAGAGA
julia> query = ExactSearchQuery(dna"AGA")
ExactSearchQuery{LongDNASeq}(AGA, 0x00000005, 2, 2)
julia> findnext(query, seq, 2)
3:5
julia> findprev(query, seq, 7)
5:7
julia> findall(query, seq)
2-element Vector{UnitRange{Int64}}:
1:3
5:7
julia> findall(query, seq, overlap=true)
4-element Vector{UnitRange{Int64}}:
1:3
3:5
5:7
7:9
Current Behavior
julia> findnext(query, seq, 1)
ERROR: MethodError: Cannot
convert
an object of type ExactSearchQuery{LongDNASeq} to an object of type DNAClosest candidates are:
convert(::Type{T}, ::UInt8) where T<:NucleicAcid at E:\ProgramFiles\Julia.julia\packages\BioSymbols\O70zi\src\nucleicacid.jl:50
convert(::Type{S}, ::T) where {T<:Number, S<:NucleicAcid} at E:\ProgramFiles\Julia.julia\packages\BioSymbols\O70zi\src\nucleicacid.jl:53
convert(::Type{DNA}, ::Char) at E:\ProgramFiles\Julia.julia\packages\BioSymbols\O70zi\src\nucleicacid.jl:66
...
Stacktrace:
[1] findnext(val::ExactSearchQuery{LongDNASeq}, seq::LongDNASeq, start::Int64)
@ BioSequences E:\ProgramFiles\Julia.julia\packages\BioSequences\k4j4J\src\biosequence\find.jl:12
[2] top-level scope
@ REPL[20]:1
julia> findprev(query, seq, 8)
ERROR: MethodError: Cannot
convert
an object of type ExactSearchQuery{LongDNASeq} to an object of type DNAClosest candidates are:
convert(::Type{T}, ::UInt8) where T<:NucleicAcid at E:\ProgramFiles\Julia.julia\packages\BioSymbols\O70zi\src\nucleicacid.jl:50
convert(::Type{S}, ::T) where {T<:Number, S<:NucleicAcid} at E:\ProgramFiles\Julia.julia\packages\BioSymbols\O70zi\src\nucleicacid.jl:53
convert(::Type{DNA}, ::Char) at E:\ProgramFiles\Julia.julia\packages\BioSymbols\O70zi\src\nucleicacid.jl:66
...
Stacktrace:
[1] findprev(val::ExactSearchQuery{LongDNASeq}, seq::LongDNASeq, start::Int64)
@ BioSequences E:\ProgramFiles\Julia.julia\packages\BioSequences\k4j4J\src\biosequence\find.jl:36
[2] top-level scope
@ REPL[21]:1
julia> findall(query, seq)
ERROR: MethodError: no method matching findall(::ExactSearchQuery{LongDNASeq}, ::LongDNASeq)
Closest candidates are:
findall(::Function, ::Any) at E:\ProgramFiles\Julia\Julia\share\julia\base\array.jl:2253
findall(::Any) at E:\ProgramFiles\Julia\Julia\share\julia\base\array.jl:2299
Stacktrace:
[1] top-level scope
@ REPL[42]:1
julia> findall(query, seq, overlap=true)
ERROR: MethodError: no method matching findall(::ExactSearchQuery{LongDNASeq}, ::LongDNASeq; overlap=true)
Closest candidates are:
findall(::Function, ::Any) at E:\ProgramFiles\Julia\Julia\share\julia\base\array.jl:2253 got unsupported keyword argument "overlap"
findall(::Any) at E:\ProgramFiles\Julia\Julia\share\julia\base\array.jl:2299 got unsupported keyword argument "overlap"
Stacktrace:
[1] top-level scope
@ REPL[22]:1
Possible Solution / Implementation
Steps to Reproduce (for bugs)
Context
Your Environment
Package Version used:
Julia Version used:
-julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Operating System and version (desktop or mobile):
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
WORD_SIZE: 64
Link to your project:
The text was updated successfully, but these errors were encountered: