* @throws SQLException
* @throws MzMLUnmarshallerException
*/
private void mapTagsForSpectrumMatch(SpectrumMatch spectrumMatch, TagMatcher tagMatcher, String key, WaitingHandler waitingHandler, boolean increaseProgress) throws IOException, InterruptedException, ClassNotFoundException, SQLException, MzMLUnmarshallerException {
TagSpectrumAnnotator spectrumAnnotator = new TagSpectrumAnnotator();
int keySize = key.length();
ArrayList<Integer> charges = new ArrayList<Integer>(1);
charges.add(1); //@TODO: use other charges?
String spectrumKey = spectrumMatch.getKey();
MSnSpectrum spectrum = (MSnSpectrum) spectrumFactory.getSpectrum(spectrumKey);
HashMap<Integer, HashMap<String, ArrayList<TagAssumption>>> tagAssumptionsMap = spectrumMatch.getTagAssumptionsMap(keySize, sequenceMatchingPreferences);
for (int advocateId : tagAssumptionsMap.keySet()) {
HashMap<String, ArrayList<TagAssumption>> algorithmTags = tagAssumptionsMap.get(advocateId);
ArrayList<TagAssumption> tagAssumptions = algorithmTags.get(key);
if (tagAssumptions != null) {
ArrayList<String> inspectedTags = new ArrayList<String>();
ArrayList<String> peptidesFound = new ArrayList<String>();
for (TagAssumption tagAssumption : tagAssumptions) {
String tagSequence = tagAssumption.getTag().asSequence();
if (!inspectedTags.contains(tagSequence)) {
mapPtmsForTag(tagAssumption.getTag(), advocateId);
ArrayList<TagAssumption> extendedTagList = new ArrayList<TagAssumption>();
extendedTagList.add(tagAssumption);
ArrayList<IonMatch> annotations = spectrumAnnotator.getSpectrumAnnotation(annotationPreferences.getIonTypes(),
new NeutralLossesMap(),
charges,
tagAssumption.getIdentificationCharge().value,
spectrum, tagAssumption.getTag(),
0,