FALCON icon indicating copy to clipboard operation
FALCON copied to clipboard

Consensus misses last base

Open pbnjay opened this issue 7 years ago • 3 comments

I believe the "sentinal" tag at falcon.c:157 should also record the previous information (p_j, p_jj, p_q_base). Otherwise the g_best_ck used on line 494 refers to the previous-to-the-last base and the entire output is missing the last consensus base.

I'd submit a PR, but the included main func doesn't compile so I couldn't test. I have made these changes in my highly modified version of the algorithm and they work as expected.

pbnjay avatar Jun 07 '17 14:06 pbnjay

Hi, @pbnjay, thanks a lot. Can you just post a quick diff so I can take a look?

pb-jchin avatar Jun 07 '17 14:06 pb-jchin

I don't think that PR will actually work to fix the issues, but here's some example data that shows the problem: https://gist.github.com/pbnjay/bd272d27041eb7c34789c6953acce1cf

Note all the sequences begin and end with the same k-mers, so the end should be "CCCAGAGAG" but it gives "CCCAGAGA" (missing final G)

pbnjay avatar Jun 07 '17 15:06 pbnjay

@pbnjay Thanks for the data. We will look into it.

pb-jchin avatar Jun 08 '17 15:06 pb-jchin