Skip to content

Commit

Permalink
Recognize MEI DELs with ALT format <DEL:ME> in SVAnnotate (#8125)
Browse files Browse the repository at this point in the history
  • Loading branch information
epiercehoffman committed Jan 3, 2023
1 parent 0261d43 commit 3687415
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.broadinstitute.hellbender.utils.SimpleInterval;
import org.broadinstitute.hellbender.utils.codecs.gtf.GencodeGtfFeature;
import org.broadinstitute.hellbender.utils.codecs.gtf.GencodeGtfTranscriptFeature;
import org.broadinstitute.hellbender.utils.variant.GATKSVVariantContextUtils;

import java.util.*;

Expand Down Expand Up @@ -476,13 +477,8 @@ protected static StructuralVariantAnnotationType getSVType(final VariantContext
}
return StructuralVariantAnnotationType.BND;
} else if (alt.isSymbolic()) {
if (alt.toString().contains("INS")) {
// account for <INS:ME>, etc. types
return StructuralVariantAnnotationType.INS;
} else {
// parse ALT as symbolic allele, assuming format <SVTYPE>
return StructuralVariantAnnotationType.valueOf(alt.toString().substring(1, alt.toString().length()-1));
}
// parse ALT as symbolic allele, assuming format <SVTYPE> or <SVTYPE:SUBTYPE_1:...:SUBTYPE_N>
return StructuralVariantAnnotationType.valueOf(GATKSVVariantContextUtils.getSymbolicAlleleSymbols(alt)[0]);
} else {
throw new IllegalArgumentException("Unexpected ALT allele: " + alt +
". Expected breakpoint or symbolic ALT allele representing a structural variant record.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ public Object[][] getSVTypesAndSegmentsTestData() {
createListOfSVSegments(SVAnnotateEngine.StructuralVariantAnnotationType.DEL,
new SimpleInterval[]{ new SimpleInterval("chr22", 10510000, 10694100)}),
null},
{ createVariantContext("chr22", 10510000, 10694100, "chr22", null, "N",
"<DEL:ME:LINE1>", 184100, null, null, null),
SVAnnotateEngine.StructuralVariantAnnotationType.DEL,
createListOfSVSegments(SVAnnotateEngine.StructuralVariantAnnotationType.DEL,
new SimpleInterval[]{ new SimpleInterval("chr22", 10510000, 10694100)}),
null},
{ createVariantContext("chr22", 10524000, 10710000, "chr22", null, "N",
"<DUP>", 186000, null, null, null),
SVAnnotateEngine.StructuralVariantAnnotationType.DUP,
Expand Down

0 comments on commit 3687415

Please sign in to comment.