DetermineHotspot { public static boolean isHotspot(@NotNull String proteinAnnotation) { try { if (isFrameshift(proteinAnnotation)) { return isValidFrameshift(proteinAnnotation); } else if (proteinAnnotation.contains(HGVS_RANGE_INDICATOR)) { return isValidRangeMutation(proteinAnnotation); } else if (proteinAnnotation.contains(HGVS_DELETION + HGVS_INSERTION)) { return isValidComplexDeletionInsertion(proteinAnnotation); } else if (proteinAnnotation.startsWith("*")) { return true; } else { return isValidSingleCodonMutation(proteinAnnotation); } } catch (Exception exception) { LOGGER.warn("Could not determine whether protein annotation '{}' is resolvable due to '{}'", proteinAnnotation, exception.getMessage(), exception); return false; } } private  DetermineHotspot(); static boolean isHotspot(@NotNull String proteinAnnotation);  }
@Test public void canAssessWhetherProteinAnnotationIsHotspot() { assertTrue(DetermineHotspot.isHotspot("K5N")); assertTrue(DetermineHotspot.isHotspot("L2230V")); assertTrue(DetermineHotspot.isHotspot("V5del")); assertTrue(DetermineHotspot.isHotspot("L755_T759del")); assertTrue(DetermineHotspot.isHotspot("L755_T756delinsPP")); assertTrue(DetermineHotspot.isHotspot("D770delinsGY")); assertTrue(DetermineHotspot.isHotspot("G10dup")); assertTrue(DetermineHotspot.isHotspot("G10fs")); assertTrue(DetermineHotspot.isHotspot("G10fs*")); assertTrue(DetermineHotspot.isHotspot("*10L")); assertFalse(DetermineHotspot.isHotspot(Strings.EMPTY)); assertFalse(DetermineHotspot.isHotspot("truncating")); assertFalse(DetermineHotspot.isHotspot("20LtoV")); assertFalse(DetermineHotspot.isHotspot("L20")); assertFalse(DetermineHotspot.isHotspot("LP")); assertFalse(DetermineHotspot.isHotspot("L")); assertFalse(DetermineHotspot.isHotspot("L2")); assertFalse(DetermineHotspot.isHotspot("L20Pdel5")); assertFalse(DetermineHotspot.isHotspot("fs")); assertFalse(DetermineHotspot.isHotspot("963_D1010splice")); assertFalse(DetermineHotspot.isHotspot("G20Pfs")); assertFalse(DetermineHotspot.isHotspot("G20*fs")); assertFalse(DetermineHotspot.isHotspot("T599insTT")); assertFalse(DetermineHotspot.isHotspot("V600D_K601insFGLAT")); assertFalse(DetermineHotspot.isHotspot("L4_T40del")); assertFalse(DetermineHotspot.isHotspot("L698_S1037dup")); assertFalse(DetermineHotspot.isHotspot("V600X")); assertFalse(DetermineHotspot.isHotspot("V600E/K")); }