________________________________________
> De : Eccles, David [[email protected]]
> Date d'envoi : 2 juillet 2011 20:26
> À : [email protected]
> Objet : Re: [Denovoassembler-users] purpose of _getOutgoingEdges /      
> _getIngoingEdges
> 
> From: Eccles, David
>> Possibly some more insights from the Vertex code?
> 
> Okay, I think I've got it. The insight arrived in my head after I was
> changing some other code in the Vertex class:
> 
> void Vertex::addIngoingEdge_ClassicMethod(Kmer*vertex,Kmer*a,int k){
> uint8_t s1First=a->getFirstCode(a->isColorSpace());
> // add s1First to edges.
> uint8_t newBits=(1<<(s1First));
> if(*vertex==m_lowerKey){
> m_edges_lower=m_edges_lower|newBits;
> }else{
> m_edges_higher=m_edges_higher|newBits;
> }
> }
> [first line modified by me to shift Kmer code into the Kmer class]
> 
> I noticed the shift left by a number dependent on the base code (A is shifted
> left 0 times, C once, and so on), and storage in m_edges_lower/upper via the
> bitwise OR. I guess I didn't see it in the other functions because of the
> double-shifts that were being done.
>

>From core/constants.h:

#define RAY_NUCLEOTIDE_A 0 /* ~00 == 11 */
#define RAY_NUCLEOTIDE_C 1 /* ~01 == 10 */
#define RAY_NUCLEOTIDE_G 2 /* ~10 == 01 */
#define RAY_NUCLEOTIDE_T 3 /* ~11 == 00 */

#define DOUBLE_ENCODING_A_COLOR '0'
#define DOUBLE_ENCODING_C_COLOR '1'
#define DOUBLE_ENCODING_G_COLOR '2'
#define DOUBLE_ENCODING_T_COLOR '3'

I believe these functions already work in color space because it is 2 bits per 
symbol nonetheless.
 
> So, each Vertex object can store all possible incoming/outgoing edges by
> using only 16 more bits, and generate full Kmers describing those edges by
> unpacking the bits. The '_getIngoingEdges' function pushes bases 'upwards',
> and fills in the ingoing edges for the first base, and (at a guess), the
> '_getOutgoingEdges' does similar by pushing down, and filling in the last
> base. Am I roughly on the right track? 

Yes, this is correct. This scheme is based on something described in the ABySS 
paper.

http://genome.cshlp.org/content/19/6/1117


> If so, I think I can probably continue
> plodding along, and shift some more of this base-shuffling code out of
> commonFunctions.cpp and into the Kmer class where it is easier to adjust to
> represent my new Kmer structure.
> 

OK

> -- David Eccles
> 
> _______________________________________________
> Denovoassembler-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/denovoassembler-users

                                                     Sébastien


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Denovoassembler-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denovoassembler-users

Reply via email to