double ionScore = Double.parseDouble(tokens[7]);
if (ionScore >= identityThreshold)
continue;
Peptide peptide = new Peptide(queryNumber, sequence, ionScore,
mass, massExpected, precursorCharge, precursorMass,
deltaMass, missedCleavages, null, "Mascot", isTopScore);
HashMap<Integer, ModificationPeptide> modifications = new HashMap<Integer, ModificationPeptide>();
ModificationPeptide[] searchedMods = pepDataFile
.getSearchedModifications();
// TODO Verify the possibility of two modifications in the same
// site.
for (int pos = 0; pos < modSeries.length(); pos++) {
if (modSeries.charAt(pos) == '1') {
char aa = sequence.charAt(pos);
for (int index = 0; index < searchedMods.length; index++) {
if (searchedMods[index].getSite() == aa) {
modifications.put(pos, searchedMods[index]);
}
}
}
}
peptide.setModifications(modifications);
// Ion serie
PeptideIonSerie peptideIonSerie = parseIonSeriesSignificance(tokens[8]);
peptide.setIonSeries(peptideIonSerie);
// Calculate fragmentation
PeptideFragmentation fragmentation = new PeptideFragmentation(
peptide, pepDataFile);
peptide.setFragmentation(fragmentation);
// Protein info
ProteinSection section;
tokens = proteinInfos[pepIndex].split(":");
String sysname = tokens[0].replace("\"", "");
Protein protein = pepDataFile.getProtein(sysname);
if (protein == null)
protein = new Protein(sysname);
int startRegion = Integer.parseInt(tokens[2]);
int stopRegion = Integer.parseInt(tokens[3]);
int multiplicity = Integer.parseInt(tokens[4]);
section = new ProteinSection(startRegion, stopRegion, multiplicity);
// Link peptide and protein
peptide.setProtein(protein);
protein.addPeptide(peptide, section, isTopScore);
peptides.add(peptide);
}