code: public static final String checkSequence(String sequence, Set<Character> cSet){
  		boolean containInvalid = false;
  		if(cSet != null){
  			containInvalid = sequence != null && doesSequenceContainInvalidChar(sequence, cSet);
  		}else{
  			containInvalid = sequence != null && doesSequenceContainInvalidChar(sequence, PeptideProperties.standardAASet);
  		}
  		if(containInvalid){
  			String cSeq = cleanSequence(sequence, cSet);
  			logger.warn("There exists invalid characters in the sequence. Computed results might not be precise.");
  			logger.warn("To remove this warning: Please use org.biojava.nbio.aaproperties.Utils.cleanSequence to clean sequence.");
  
  			return cSeq;
  		}
  		else{
  			return sequence;
  		}
  	}
docs: Checks if the sequence contains invalid characters.
  Note that any character outside of the 20 standard protein amino acid codes are considered as invalid.
  If yes, it will return a new sequence where invalid characters are replaced with '-'.
  If no, it will simply return the input sequence.
  
  @param sequence
  protein sequence to be check for invalid characters.
  @param cSet
  character set which define the valid characters.
  @return
  a sequence with no invalid characters.