[Denovoassembler-devel] RE : Why flush both k-mer and its complement?
Ray -- Parallel genome assemblies for parallel DNA sequencing
Brought to you by:
sebhtml
From: Sébastien B. <seb...@ul...> - 2011-07-21 15:39:40
|
I think there is a bug: In your for loop, the second iteration (flush=1) should add b in the m_bufferedData, not a twice ! What I had in mind (pseudo C++): /* get the pair of k-mers */ Kmer a = kmerAtPosition() Kmer b=a.reverseComplement() /* compute the destination */ Kmer rankToFlush=-1; if(a<b) rankToFlush=a.hash_function_1()%m_parameters.getSize() else rankToFlush=b.hash_function_1()%m_parameters.getSize() /* push a to destination and flush if necessary */ push a to rankToFlush usin bufferedData.addAt bufferedData.flush() /* push b to destination and flush if necessary */ push b to rankToFlush usins bufferedData.addAt bufferedData.flush() This has only a call to reverseComplement and do the same as refs/master > ________________________________________ > De : David Eccles (gringer) [dav...@mp...] > Date d'envoi : 21 juillet 2011 11:07 > À : Sébastien Boisvert > Cc : den...@li... > Objet : Re: Why flush both k-mer and its complement? > > On 21/07/11 16:40, Sébastien Boisvert wrote: >> Although both k-mers will go on the same MPI rank, >> the first flush may generate an actual MPI message on the network. >> As such, the second flush won't flush anything because the buffer was just reset. >> On the other hand, if the first k-mer does not generate a message when flush is called, >> then the second flush may do so. >> >> Feel free to send me a patch for this ! > > Okay, I've attached a patch that just does the flush twice without any > additional reverse complelements. > > -- David > Sébastien |