-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
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 .
Metadata
Metadata
Assignees
Labels
No labels