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

Fix for mdtag issues with insertions #748

Merged
merged 1 commit into from Jul 30, 2015

Conversation

Projects
None yet
3 participants
@arahuja
Contributor

arahuja commented Jul 29, 2015

Sorry all, looks the code in #727 contains a few errors when it came to parsing mismatches mixed with insertions. I added a quite a few tests to cover this case and other complex mdtags.

If you think there are interesting cases not covered in the new tests now let me know!

Thanks!

assert(tag.toString === "2A4A2")
}
test("Get correct matches for mdtag with intron and deletion between mismatches") {

This comment has been minimized.

@ryan-williams

ryan-williams Jul 30, 2015

Member

hm, copy mcpastington? same test as above, different name?

@ryan-williams

ryan-williams Jul 30, 2015

Member

hm, copy mcpastington? same test as above, different name?

This comment has been minimized.

@arahuja

arahuja Jul 30, 2015

Contributor

Yes! I should was trying to think of more cases, but didn't add the test actually

@arahuja

arahuja Jul 30, 2015

Contributor

Yes! I should was trying to think of more cases, but didn't add the test actually

(9 to 10).foreach(locus => assert(tag.isMatch(locus)))
assert(tag.mismatches(11L) === 'A')

This comment has been minimized.

@ryan-williams

ryan-williams Jul 30, 2015

Member

nit: missing a last "match" check on idx 12?

@ryan-williams

ryan-williams Jul 30, 2015

Member

nit: missing a last "match" check on idx 12?

This comment has been minimized.

@arahuja

arahuja Jul 30, 2015

Contributor

Yea figured it was repetitive at this point, but I'll add it

@arahuja

arahuja Jul 30, 2015

Contributor

Yea figured it was repetitive at this point, but I'll add it

@ryan-williams

This comment has been minimized.

Show comment
Hide comment
@ryan-williams

ryan-williams Jul 30, 2015

Member

added some of my nits in hammerlab#2 including the check that the number of deleted bases is consistent between cigar and MDTag.

thoughts on some test cases verifying that IAEs are thrown when the various assumptions are broken?

Member

ryan-williams commented Jul 30, 2015

added some of my nits in hammerlab#2 including the check that the number of deleted bases is consistent between cigar and MDTag.

thoughts on some test cases verifying that IAEs are thrown when the various assumptions are broken?

@arahuja

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Jul 30, 2015

Contributor

@ryan-williams I fixed the dupe test and added a test case for the exception you added (mdtag and cigar disagreeing on deleted bases)

I also made the match statement explicit for the operators they were catching

re: cigarOperatorIndex, the only operator never traversed in one shot is M since you can look for matches for mismatches, therefore for every other operator cigarOperatorIndex is always 0

Contributor

arahuja commented Jul 30, 2015

@ryan-williams I fixed the dupe test and added a test case for the exception you added (mdtag and cigar disagreeing on deleted bases)

I also made the match statement explicit for the operators they were catching

re: cigarOperatorIndex, the only operator never traversed in one shot is M since you can look for matches for mismatches, therefore for every other operator cigarOperatorIndex is always 0

@ryan-williams

This comment has been minimized.

Show comment
Hide comment
@ryan-williams

ryan-williams Jul 30, 2015

Member

cool, thanks @arahuja. LGTM once tests pass. Last complete build failed due to needing ./scripts/format-source btw

Member

ryan-williams commented Jul 30, 2015

cool, thanks @arahuja. LGTM once tests pass. Last complete build failed due to needing ./scripts/format-source btw

@arahuja

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Jul 30, 2015

Contributor

Ah ok, good to know, I didn't realize this wasn't auto-formatting, I'll run that, squash etc.

Contributor

arahuja commented Jul 30, 2015

Ah ok, good to know, I didn't realize this wasn't auto-formatting, I'll run that, squash etc.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jul 30, 2015

Member

LGTM as well.

Member

fnothaft commented Jul 30, 2015

LGTM as well.

ryan-williams added a commit that referenced this pull request Jul 30, 2015

Merge pull request #748 from hammerlab/mdtag-more-fix
Fix for mdtag issues with insertions

@ryan-williams ryan-williams merged commit 312aea7 into bigdatagenomics:master Jul 30, 2015

1 check passed

default Merged build finished.
Details

@ryan-williams ryan-williams deleted the hammerlab:mdtag-more-fix branch Jul 30, 2015

@fnothaft fnothaft referenced this pull request Aug 3, 2015

Merged

Add dbsnp to mutect caller #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment