use of net.sf.mzmine.modules.peaklistmethods.isotopes.isotopepeakscanner.Candidate in project mzmine2 by mzmine.
the class NeutralLossFilterTask method getRowFromCandidate.
/**
* Extracts a feature list row from a Candidates array.
*
* @param candidates
* @param peakIndex the index of the candidate peak, the feature list row should be extracted for.
* @param plh
* @return null if no peak with the given parameters exists, the specified feature list row
* otherwise.
*/
@Nullable
private PeakListRow getRowFromCandidate(@Nonnull Candidates candidates, int peakIndex, @Nonnull PeakListHandler plh) {
if (peakIndex >= candidates.size())
return null;
Candidate cand = candidates.get(peakIndex);
if (cand != null) {
int id = cand.getCandID();
PeakListRow original = plh.getRowByID(id);
return original;
}
return null;
}
Aggregations