Search in sources :

Example 1 with Candidate

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;
}
Also used : Candidate(net.sf.mzmine.modules.peaklistmethods.isotopes.isotopepeakscanner.Candidate) SimplePeakListRow(net.sf.mzmine.datamodel.impl.SimplePeakListRow) PeakListRow(net.sf.mzmine.datamodel.PeakListRow) Nullable(javax.annotation.Nullable)

Aggregations

Nullable (javax.annotation.Nullable)1 PeakListRow (net.sf.mzmine.datamodel.PeakListRow)1 SimplePeakListRow (net.sf.mzmine.datamodel.impl.SimplePeakListRow)1 Candidate (net.sf.mzmine.modules.peaklistmethods.isotopes.isotopepeakscanner.Candidate)1