Skip to content

Commit

Permalink
use utility method to get symbolic allele symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
epiercehoffman committed Dec 8, 2022
1 parent 32514bb commit 3eb4c98
Showing 1 changed file with 2 additions and 3 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 @@ -477,9 +478,7 @@ protected static StructuralVariantAnnotationType getSVType(final VariantContext
return StructuralVariantAnnotationType.BND;
} else if (alt.isSymbolic()) {
// 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]);
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

0 comments on commit 3eb4c98

Please sign in to comment.