code: public final static int getNumberOfInvalidChar(String sequence, Set<Character> cSet, boolean ignoreCase){
  		int total = 0;
  		char[] cArray;
  		if(ignoreCase) cArray = sequence.toUpperCase().toCharArray();
  		else cArray = sequence.toCharArray();
  		if(cSet == null) cSet = PeptideProperties.standardAASet;
  		for(char c:cArray){
  			if(!cSet.contains(c)) total++;
  		}
  		return total;
  	}
docs: Return the number of invalid characters in sequence.
  
  @param sequence
  protein sequence to count for invalid characters.
  @param cSet
  the set of characters that are deemed valid.
  @param ignoreCase
  indicates if cases should be ignored
  @return
  the number of invalid characters in sequence.