Breakend bnd = parseBreakend(reference, alternates.get(0)); if (bnd != null) { sv.setBreakend(bnd);
private StructuralVariation buildSv(String[] split, String reference, String alternate) { if (split.length == SV_SPLIT_LENGTH) { try { Breakend breakend = VariantBuilder.parseBreakend(reference, alternate); return new StructuralVariation( getInt(split, CI_POS_L), getInt(split, CI_POS_R), getInt(split, CI_END_L), getInt(split, CI_END_R), VariantBuilder.getCopyNumberFromAlternate(alternate), null, null, null, breakend); } catch (RuntimeException e) { for (String s : split) { // If any of the splits is non printable, the variantId had 4 colons in the SHA1 if (!StringUtils.isAsciiPrintable(s)) { return null; } } throw new IllegalArgumentException("Unable to build SV from " + String.join(SEPARATOR, split), e); } } else { return null; } }
private static VariantKeyFields normalizeMateBreakend( final Integer start, final String reference, final String alternate, List<String> alternates, final int numAllelesIdx) { Breakend breakend = VariantBuilder.parseBreakend(reference, alternate); if (breakend == null) { throw new VariantNormalizerException("Missing breakend information for variant " + start + ":" + reference