Package org.bmdrc.mass.tool

Source Code of org.bmdrc.mass.tool.NovelPeakFinder

package org.bmdrc.mass.tool;

import java.io.Serializable;
import org.bmdrc.mass.PeakList;
import org.bmdrc.mass.PeakUnit;

/**
*
* @author SungBo Hwang, CSB
*/
public class NovelPeakFinder implements Serializable{
    private static final long serialVersionUID = -6381629968938410711L;
    private PeakList itsOriginalPeakList;
    private PeakList itsTestPeakList;

    public NovelPeakFinder(PeakList theOriginalPeakList, PeakList theTestPeakList) {
        this.setOriginalPeakList(theOriginalPeakList);
        this.setTestPeakList(theTestPeakList);
    }
   
    public PeakList getOriginalPeakList() {
        return itsOriginalPeakList;
    }

    public void setOriginalPeakList(PeakList theOriginalPeakList) {
        this.itsOriginalPeakList = new PeakList(theOriginalPeakList);
    }

    public PeakList setOriginalPeakList() {
        return itsOriginalPeakList;
    }
   
    public PeakList getTestPeakList() {
        return itsTestPeakList;
    }

    public void setTestPeakList(PeakList theTestPeakList) {
        this.itsTestPeakList = new PeakList(theTestPeakList);
    }
   
    public PeakList setTestPeakList() {
        return itsTestPeakList;
    }

    public PeakList calculateNovelPeakList() {
        PeakList theNovelPeakList = new PeakList();
       
       for(PeakUnit theTestPeak : this.getTestPeakList().getPeakList()) {
           if(!this.getOriginalPeakList().containsWeight(theTestPeak)) {
               theNovelPeakList.addPeak(theTestPeak);
           }
       }
       
        return theNovelPeakList;
    }
}
TOP

Related Classes of org.bmdrc.mass.tool.NovelPeakFinder

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.