code: public static FastaSequence convertProteinSequencetoFasta(ProteinSequence sequence){
  		StringBuffer buf = new StringBuffer();
  		for (AminoAcidCompound compound : sequence) {
  
  			String c = compound.getShortName();
  
  			if (! SequenceUtil.NON_AA.matcher(c).find()) {
  				buf.append(c);
  			} else {
  				buf.append("X");
  			}
  		}
  
  		return new FastaSequence(sequence.getAccession().getID(),buf.toString());
  	}
docs: Utility method to convert a BioJava ProteinSequence object to the FastaSequence
  object used internally in JRonn.
  
  @param sequence
  @return