Skip to content

Commit

Permalink
Update Impact annotation to work properly on symbolic alleles (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber authored Oct 11, 2023
1 parent 3b48e10 commit 0d04d4e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,16 @@ public Map<String, Object> annotate(ReferenceContext ref, VariantContext vc, All
Map<Allele, String> effectMap = new HashMap<>();

for (Allele a : vc.getAlternateAlleles()) {
if (!annByAllele.containsKey(a.getBaseString())) {
// Note: use displayString to handle symbolic alleles
if (!annByAllele.containsKey(a.getDisplayString())) {
continue;
}

Set<String> impacts = new HashSet<>();
Set<String> hig = new HashSet<>();
Set<String> og = new HashSet<>();
Set<String> effects = new HashSet<>();
for (String[] split : annByAllele.get(a.getBaseString())) {
for (String[] split : annByAllele.get(a.getDisplayString())) {
if (split.length > 7 && "protein_coding".equals(split[7])) {
impacts.add(split[2]);

Expand Down

0 comments on commit 0d04d4e

Please sign in to comment.