Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue in hmm kernel #4

Open
dridon opened this issue Apr 27, 2014 · 0 comments
Open

issue in hmm kernel #4

dridon opened this issue Apr 27, 2014 · 0 comments

Comments

@dridon
Copy link

dridon commented Apr 27, 2014

When the algorithm calculates the scaling factor in estimate_b in main_bwa_hmm.c @ line 871-872, the states are treated as the rows and the symbols the columns.
mat_vec_mul( 'N', nstates, nsymbols, b_d, nstates,
ones_s_d, 0, c_d, 0);

But in the kernel the indexing scheme seems to suggest the reverse:
if (idx < nstates && idy < nsymbols)
{
if (b_d[(idy * nstates) + idx] == 0)
{
b_d[(idy * nstates) + idx] = 1e-10;
}
else
{
b_d[(idy * nstates) + idx] = b_d[(idy * nstates) + idx] / c_d[idx];
}
}

Shouldn't the matrix be transposed and then multiplied or the kernel be changed? Otherwise we get a division by zero (after we change the 'N' to 'n', see issue #3 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant