/** Set the default preferences. */
 private void setDefaultPreferences() {
   searchParameters = new SearchParameters();
   annotationPreferences.setAnnotationLevel(0.75);
   annotationPreferences.useAutomaticAnnotation(true);
   spectrumCountingPreferences.setSelectedMethod(SpectralCountingMethod.NSAF);
   spectrumCountingPreferences.setValidatedHits(true);
   IonFactory.getInstance().addDefaultNeutralLoss(NeutralLoss.NH3);
   IonFactory.getInstance().addDefaultNeutralLoss(NeutralLoss.H2O);
   processingPreferences = new ProcessingPreferences();
   ptmScoringPreferences = new PTMScoringPreferences();
 }
 /** Updates the ions used for fragment annotation. */
 public void updateAnnotationPreferencesFromSearchSettings() {
   annotationPreferences.setPreferencesFromSearchParamaers(searchParameters);
 }
 public ArrayList<IonMatch> getIonsCurrentlyMatched() throws MzMLUnmarshallerException {
   return spectrumAnnotator.getCurrentAnnotation(
       annotationPreferences.getIonTypes(),
       annotationPreferences.getNeutralLosses(),
       annotationPreferences.getValidatedCharges());
 }