if (assumptionFilter.getPrecursorMzError() != null
|| assumptionFilter.getMinPrecursorMzError() != null
|| assumptionFilter.getMaxPrecursorMzError() != null) {
SpectrumFactory spectrumFactory = SpectrumFactory.getInstance();
Precursor precursor = spectrumFactory.getPrecursor(spectrumKey);
if (assumptionFilter.getPrecursorMzError() != null) {
double error = Math.abs(peptideAssumption.getDeltaMass(precursor.getMz(), searchParameters.isPrecursorAccuracyTypePpm()));
if (assumptionFilter.getPrecursorMzErrorComparison() == RowFilter.ComparisonType.AFTER) {
if (error <= assumptionFilter.getPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMzErrorComparison() == RowFilter.ComparisonType.BEFORE) {
if (error >= assumptionFilter.getPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMzErrorComparison() == RowFilter.ComparisonType.EQUAL) {
if (error != assumptionFilter.getPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMzErrorComparison() == RowFilter.ComparisonType.NOT_EQUAL) {
if (error == assumptionFilter.getPrecursorMzError()) {
return false;
}
}
}
if (assumptionFilter.getMinPrecursorMzError() != null) {
double error = peptideAssumption.getDeltaMass(precursor.getMz(), searchParameters.isPrecursorAccuracyTypePpm());
if (assumptionFilter.getPrecursorMinMzErrorComparison() == RowFilter.ComparisonType.AFTER) {
if (error <= assumptionFilter.getMinPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMinMzErrorComparison() == RowFilter.ComparisonType.BEFORE) {
if (error >= assumptionFilter.getMinPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMinMzErrorComparison() == RowFilter.ComparisonType.EQUAL) {
if (error != assumptionFilter.getMinPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMinMzErrorComparison() == RowFilter.ComparisonType.NOT_EQUAL) {
if (error == assumptionFilter.getMinPrecursorMzError()) {
return false;
}
}
}
if (assumptionFilter.getMaxPrecursorMzError() != null) {
double error = peptideAssumption.getDeltaMass(precursor.getMz(), searchParameters.isPrecursorAccuracyTypePpm());
if (assumptionFilter.getPrecursorMaxMzErrorComparison() == RowFilter.ComparisonType.AFTER) {
if (error <= assumptionFilter.getMaxPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMaxMzErrorComparison() == RowFilter.ComparisonType.BEFORE) {
if (error >= assumptionFilter.getMaxPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMaxMzErrorComparison() == RowFilter.ComparisonType.EQUAL) {
if (error != assumptionFilter.getMaxPrecursorMzError()) {
return false;
}
} else if (assumptionFilter.getPrecursorMaxMzErrorComparison() == RowFilter.ComparisonType.NOT_EQUAL) {
if (error == assumptionFilter.getMaxPrecursorMzError()) {
return false;
}
}
}
}
if (assumptionFilter.getCharges() != null) {
int charge = peptideAssumption.getIdentificationCharge().value;
if (!assumptionFilter.getCharges().contains(charge)) {
return false;
}
}
if (assumptionFilter.getSequenceCoverage() != null) {
SpectrumFactory spectrumFactory = SpectrumFactory.getInstance();
MSnSpectrum spectrum = (MSnSpectrum) spectrumFactory.getSpectrum(spectrumKey);
Peptide peptide = peptideAssumption.getPeptide();
if (peptideSpectrumAnnotator == null) {
peptideSpectrumAnnotator = new PeptideSpectrumAnnotator();
}
HashMap<Integer, ArrayList<IonMatch>> ionMatches = peptideSpectrumAnnotator.getCoveredAminoAcids(annotationPreferences.getIonTypes(),