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

Handle CTX_INV subtype in SVAnnotate #8693

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Conversation

epiercehoffman
Copy link
Contributor

Updates

A record with SVTYPE=CTX and CPX_TYPE=CTX_INV was added to a recent GATK-SV VCF after manual curation. The following changes were made to be able to properly annotate this type of event.

  • CPX_TYPE will be checked for CTX records, and if it is CTX_INV, the INV interval from CPX_INTERVALS will be added to the annotation segments.
  • Additionally, instead of annotating two breakpoint intervals CHROM:POS-END and CHR2:END2-END2+1 for CTX events, we will now annotate 4 individual breakpoints to cover the case where END != POS+1. Those 4 breakpoints are CHROM:POS-POS, CHROM:END-END, CHR2:END2-END2, and CHR2:END2+1-END2+1.
  • In the future, to be able to represent intervals on CHR2, POS2 may be added. SVAnnotate will need to be updated accordingly at that time.

Testing

  • Unit tests for CTX_INV added
  • Unit tests for other CTX updated
  • A one-line VCF was created to test the real-life example CTX_INV event that was curated, and it was annotated correctly

Copy link
Contributor

@mwalker174 mwalker174 left a comment

Choose a reason for hiding this comment

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

Thanks @epiercehoffman looks fine to me. As we discussed offline, I'm concerned about special cases like this creeping into the VCF, but it's not he first and this should be a larger discussion. One minor suggestion below.

// annotate both breakpoints of translocation - CHR2:END2-END2+1
// if SVTYPE is CTX and CPX_TYPE is CTX_INV, add INV from CTX_INTERVALS
if (complexType == GATKSVVCFConstants.ComplexVariantSubtype.CTX_INV && !cpxIntervals.isEmpty()) {
intervals = getComplexAnnotationIntervals(parseComplexIntervals(cpxIntervals), complexType);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to either have getComplexAnnotationIntervals() return an ArrayList or wrap this call in new ArrayList(). The reason being that the returned List could be immutable (it's not right now, but possible it could change in the future), in which case the calls to .add() below would throw an error.

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

Successfully merging this pull request may close these issues.

2 participants