Comments (5)
Thanks for pointing this out @diegozea, perhaps we can include this method in version 2.0.
from biosequences.jl.
I have been going over the source code to get familiar and to add this functionality. I could not understand how the decode function call in indexing.jl properly decodes the given Int representation. I could not find a decode function in the source code. Below is the corresponding code from indexing.jl:
@inline function inbounds_getindex(seq::BioSequence{A}, i::Integer) where {A}
j = bitindex(seq, i)
@inbounds return decode(A, (seq.data[index(j)] >> offset(j)) & mask(A))
end
from biosequences.jl.
@ardakdemir The definitions for encode
and decode
are found here in the body of this loop
BioSequences.jl/src/alphabet.jl
Line 127 in e54ee6b
A
of the BioSequence{A}
, and so A
is the first argument to the decode
method, so as Julia's compiler can select the correct decode
method at compile time.from biosequences.jl.
@benjward Thanks for the explanation. @diegozea I have added a trivial implementation of subsequencing functionality on the "subsequencing" branch. Maybe you can give it a try.
from biosequences.jl.
This appears to be fixed on master, so closing it
from biosequences.jl.
Related Issues (20)
- Implement rand! HOT 1
- FASTA module not defined HOT 1
- Add doctests to CI HOT 2
- Indexing with bool or integer vector does not work with seqview HOT 1
- Converting a LongSubSeq to LongSequence can give weird results HOT 1
- New Feature: Molecular weight calculations for BioSequences HOT 8
- Translate subsequence
- Improve error message on encoding error HOT 1
- Record type inference HOT 3
- Use lowercase in DNA sequences HOT 1
- domain name of this repo should be updated HOT 4
- Translation Issue arising from `isambiguous(DNA_Gap) == false` HOT 2
- Can we skip check in `decode`?
- Feature: concatenate bases with sequences HOT 4
- Consider making Random a weak dep HOT 1
- Get this package back into PkgEval HOT 3
- Create and export a generic test biosequence
- How should one search for ORFs? HOT 5
- A strange behavior in approximate searches HOT 4
- `ispalindromic` with respect to `reverse` or `reverse_complement`? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biosequences.jl.