Skip to content

Commit

Permalink
recognize MEI DELs with ALT <DEL:ME> or similar
Browse files Browse the repository at this point in the history
  • Loading branch information
epiercehoffman committed Dec 8, 2022
1 parent 84ade40 commit 32514bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,10 @@ 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>
// convert ALT to string, remove first and last character (<>), split by :, take first element
return StructuralVariantAnnotationType.valueOf(alt.toString().substring(1, alt.toString().length()-1)
.split(":")[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 32514bb

Please sign in to comment.