public static boolean isNonAmbNucleotideSequence(String sequence) {
	sequence = SequenceUtil.cleanSequence(sequence);
	if (SequenceUtil.DIGIT.matcher(sequence).find()) {
		return false;
	}
	if (SequenceUtil.NON_NUCLEOTIDE.matcher(sequence).find()) {
		return false;
		/*
		 * System.out.format("I found the text starting at " +
		 * "index %d and ending at index %d.%n", nonDNAmatcher .start(),
		 * nonDNAmatcher.end());
		 */
	}
	final Matcher DNAmatcher = SequenceUtil.NUCLEOTIDE.matcher(sequence);
	return DNAmatcher.find();
	}
public static boolean isNonAmbNucleotideSequence ( String sequence ) { sequence = SequenceUtil . cleanSequence ( sequence ) ; if ( SequenceUtil . DIGIT . matcher ( sequence ) . find ( ) ) { return false ; } if ( SequenceUtil . NON_NUCLEOTIDE . matcher ( sequence ) . find ( ) ) { return false ; } final Matcher DNAmatcher = SequenceUtil . NUCLEOTIDE . matcher ( sequence ) ; return DNAmatcher . find ( ) ; }
Ambiguous DNA chars : AGTCRYMKSWHBVDN // differs from protein in only one
(!) - B char