Alignments { static boolean isMismatchSymbol(final Symbol symbol) { if (!(symbol instanceof BasisSymbol)) { return false; } BasisSymbol basisSymbol = (BasisSymbol) symbol; Set<Symbol> uniqueSymbols = new HashSet<Symbol>(); for (Object o : basisSymbol.getSymbols()) { Symbol s = (Symbol) o; if (isGapSymbol(s)) { return false; } uniqueSymbols.add((Symbol) o); } return (uniqueSymbols.size() > 1); } private  Alignments(); static long length(final Range<Long> range); static List<Long> lengths(final Iterable<Range<Long>> ranges); static long length(final Iterable<Range<Long>> ranges); static long maximumLength(final Iterable<Range<Long>> ranges); static int count(final Iterable<Range<Long>> ranges); static List<Long> starts(final Iterable<Range<Long>> ranges); static List<Long> ends(final Iterable<Range<Long>> ranges); static List<Range<Long>> gaps(final GappedSymbolList gappedSymbols); static List<Range<Long>> matches(final AlignmentPair alignmentPair); static List<Range<Long>> mismatches(final AlignmentPair alignmentPair);  }
@Test public void testIsMismatchSymbolNull() { assertFalse(isMismatchSymbol(null)); }
@Test public void testIsMismatchSymbolGapSymbol() { assertFalse(isMismatchSymbol(DNATools.getDNA().getGapSymbol())); }
@Test public void testIsMismatchSymbol() { assertFalse(isMismatchSymbol(alignmentPair.symbolAt(1))); assertTrue(isMismatchSymbol(alignmentPair.symbolAt(5))); assertFalse(isMismatchSymbol(alignmentPair.symbolAt(13))); }