switch (column) {
case 0:
return viewIndex + 1;
case 1:
PSParameter psParameter = (PSParameter) identification.getPeptideMatchParameter(peptideKey, new PSParameter(), useDB && !isScrolling);
if (psParameter == null) {
if (isScrolling()) {
return null;
} else if (!useDB) {
dataMissingAtRow(row);
return DisplayPreferences.LOADING_MESSAGE;
}
}
return psParameter.isStarred();
case 2:
psParameter = (PSParameter) identification.getPeptideMatchParameter(peptideKey, new PSParameter(), useDB && !isScrolling);
if (psParameter == null) {
if (isScrolling()) {
return null;
} else if (!useDB) {
dataMissingAtRow(row);
return DisplayPreferences.LOADING_MESSAGE;
}
}
return psParameter.getProteinInferenceClass();
case 3:
PeptideMatch peptideMatch = identification.getPeptideMatch(peptideKey, useDB && !isScrolling);
if (peptideMatch == null) {
if (isScrolling()) {
return null;
} else if (!useDB) {
dataMissingAtRow(row);
return Peptide.getSequence(peptideKey);
}
}
return peptideShakerGUI.getDisplayFeaturesGenerator().getTaggedPeptideSequence(peptideMatch, true, true, true);
case 4:
if (isScrolling) {
return null;
}
ArrayList<Integer> indexes;
if (sequenceFactory == null) {
return null;
}
try {
Protein currentProtein = sequenceFactory.getProtein(proteinAccession);
String peptideSequence = Peptide.getSequence(peptideKey);
indexes = currentProtein.getPeptideStart(peptideSequence,
peptideShakerGUI.getSequenceMatchingPreferences());
} catch (IOException e) {
peptideShakerGUI.catchException(e);
return "IO Exception";
}
Collections.sort(indexes);
return new StartIndexes(indexes); // note: have to be "packed" like this in order to be able to resetSorting on the first index if multiple indexes
case 5:
if (isScrolling) {
return null;
}
peptideMatch = identification.getPeptideMatch(peptideKey, useDB);
if (!useDB
&& (peptideMatch == null || !peptideShakerGUI.getIdentificationFeaturesGenerator().nValidatedSpectraForPeptideInCache(peptideKey))
&& (peptideMatch == null || !identification.peptideDetailsInCache(peptideKey))) {
dataMissingAtRow(row);
return DisplayPreferences.LOADING_MESSAGE;
}
double nConfidentSpectra = peptideShakerGUI.getIdentificationFeaturesGenerator().getNConfidentSpectraForPeptide(peptideKey);
double nDoubtfulSpectra = peptideShakerGUI.getIdentificationFeaturesGenerator().getNValidatedSpectraForPeptide(peptideKey) - nConfidentSpectra;
int nSpectra = peptideMatch.getSpectrumMatches().size();
ArrayList<Double> doubleValues = new ArrayList<Double>();
doubleValues.add(nConfidentSpectra);
doubleValues.add(nDoubtfulSpectra);
doubleValues.add(nSpectra - nConfidentSpectra - nDoubtfulSpectra);
ArrrayListDataPoints arrrayListDataPoints = new ArrrayListDataPoints(doubleValues, JSparklinesArrayListBarChartTableCellRenderer.ValueDisplayType.sumOfNumbers);
return arrrayListDataPoints;
case 6:
psParameter = (PSParameter) identification.getPeptideMatchParameter(peptideKey, new PSParameter(), useDB && !isScrolling);
if (psParameter == null) {
if (isScrolling) {
return null;
} else if (!useDB) {
dataMissingAtRow(row);
return DisplayPreferences.LOADING_MESSAGE;
}
}
if (psParameter != null) {
if (peptideShakerGUI.getDisplayPreferences().showScores()) {
return psParameter.getPeptideScore();
} else {
return psParameter.getPeptideConfidence();
}
} else {
return null;
}
case 7:
psParameter = (PSParameter) identification.getPeptideMatchParameter(peptideKey, new PSParameter(), useDB && !isScrolling);
if (psParameter == null) {
if (isScrolling) {
return null;
} else if (!useDB) {
dataMissingAtRow(row);
return DisplayPreferences.LOADING_MESSAGE;
}
}
if (psParameter != null) {
return psParameter.getMatchValidationLevel().getIndex();
} else {
return null;
}
default:
return null;