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

SmithWaterman returns incorrect alignments. #104

Open
d-cameron opened this issue Apr 27, 2020 · 4 comments
Open

SmithWaterman returns incorrect alignments. #104

d-cameron opened this issue Apr 27, 2020 · 4 comments
Labels

Comments

@d-cameron
Copy link

The S/W aligner does not return optimal alignments.
Tested version: 0.8.6
Repo test case:

    @Test
    public void should_return_maximal_alignment_match() {
        IntelSmithWaterman isw = new IntelSmithWaterman();
        assertTrue(isw.load(null));
        SWNativeAlignerResult alignment = isw.align(
                "GGGGGGTTTTTT".getBytes(),
                "AAACCCTTTTTT".getBytes(),
                // BWA alignment scoring matrix
                new SWParameters(1, -4, -6, -1),
                SWOverhangStrategy.SOFTCLIP);
        assertEquals("6S6M", alignment.cigar);
        assertEquals(6, alignment.alignment_offset);
    }

Actual alignment cigar returned is 11S1M. This is clearly a sub-optimal alignment.

I strongly recommend adding a test suite to exhaustively compare small results against another S/W aligner (e.g. JAligner) to ensure correctness of your implementation.

@lbergelson
Copy link
Contributor

lbergelson commented Apr 28, 2020

That's worrisome. We've never enabled the optimized smith waterman by default in GATK because of some other issues, but I hadn't ever seen it produce grossly incorrect alignments. I was under the impression that it had been tested pretty heavily against the GATK java implementation. I wonder if we produce the same bad alignment...

@lbergelson
Copy link
Contributor

lbergelson commented Apr 28, 2020

I'm confused about this one. Running this code against the GATK java smith waterman implementation produces the same result. It seems to have something to do with the overhang strategy although none of the overhang strategies produce the answer that seems most correct. @davidbenjamin do you have any sense of what's going on here?

@davidbenjamin
Copy link

@lbergelson See comments in broadinstitute/gatk#6576.

@Kmannth
Copy link
Contributor

Kmannth commented Aug 27, 2020

Still blocked on broadinstitute/gatk#6576

@Kmannth Kmannth added the bug label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants