RightAlignMicrohomology implements Consumer<SageVariant> { @NotNull static VariantHotspot rightAlignDel(@NotNull final VariantHotspot variant, @NotNull final String microhomology) { int microhomologyLength = microhomology.length(); final String alt = microhomology.substring(microhomologyLength - 1); final String ref = variant.ref().substring(microhomologyLength) + microhomology; return ImmutableVariantHotspotImpl.builder() .from(variant) .position(variant.position() + microhomologyLength) .ref(ref) .alt(alt) .build(); } RightAlignMicrohomology(final Consumer<SageVariant> consumer, final List<HmfTranscriptRegion> transcripts); @Override void accept(final SageVariant variant); void flush();  }
@Test public void testRightAlignDel() { final String microhomology = "AG"; final VariantHotspot leftAligned = BufferedPostProcessorTest.create(100, "CAGAAACCCATGTATGAAGTACAGTGGA", "C"); final VariantHotspot rightAligned = RightAlignMicrohomology.rightAlignDel(leftAligned, microhomology); assertEquals(102, rightAligned.position()); assertEquals("GAAACCCATGTATGAAGTACAGTGGAAG", rightAligned.ref()); assertEquals("G", rightAligned.alt()); }