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

Fix edge case when haplotypes have leading insertion after trimming #6518

Merged
merged 3 commits into from
Mar 23, 2020

Conversation

davidbenjamin
Copy link
Contributor

@takutosato Two quick edge cases and new unit tests. These were exposed when fixing other bugs.

Copy link
Contributor

@takutosato takutosato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@@ -141,6 +141,9 @@ public static GATKRead createReadAlignedToRef(final GATKRead originalRead,
*
* If refStart or refEnd would start or end the new bases within a deletion, this function will return null
*
* If the cigar starts with an insertion, the inserted bases are considered as coming before the start position and
* are therefore excluded from the result. That is getBasesCoveringRefInterval(0, 3, "ACTTGT", 0) should yield "TTGT".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add the cigar "2I4M" here: so

That is getBasesCoveringRefInterval(0, 3, "ACTTGT", 0) -> That is getBasesCoveringRefInterval(0, 3, "ACTTGT", 0, "2I4M")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@davidbenjamin davidbenjamin merged commit ee4b611 into master Mar 23, 2020
@davidbenjamin davidbenjamin deleted the db_trim_haplotype_leading_insertion branch March 23, 2020 17:48
@davidbenjamin davidbenjamin restored the db_trim_haplotype_leading_insertion branch March 23, 2020 17:48
@davidbenjamin davidbenjamin deleted the db_trim_haplotype_leading_insertion branch March 23, 2020 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants