public void TestProcess() { var peaks = new PeakList<Peak>(); peaks.Add(new Peak(1.0, 10.0)); peaks.Add(new Peak(2.0, 100.0)); var processor1 = new PeakListMinTotalIonIntensityProcessor<Peak>(50.0); Assert.AreSame(peaks, processor1.Process(peaks)); var processor2 = new PeakListMinIonIntensityProcessor<Peak>(150.0); Assert.AreSame(null, processor2.Process(peaks)); }
public Raw2MgfProcessor GetRaw2MgfProcessor() { PeakListMassRangeProcessor <Peak> p1 = new PeakListMassRangeProcessor <Peak>(MinimumMass, MaximumMass, new int[] { 2, 3 }); PeakListMinIonIntensityProcessor <Peak> p2 = new PeakListMinIonIntensityProcessor <Peak>(MinimumIonIntensity); PeakListMinIonCountProcessor <Peak> p3 = new PeakListMinIonCountProcessor <Peak>(MinIonCount); PeakListMinTotalIonIntensityProcessor <Peak> p4 = new PeakListMinTotalIonIntensityProcessor <Peak>(MinimumTotalIonCount); CompositeProcessor <PeakList <Peak> > p = new CompositeProcessor <PeakList <Peak> >(); p.Add(p1); p.Add(p2); p.Add(p3); p.Add(p4); return(new Raw2MgfProcessor(null, GetMascotGenericFormatWriter(), GetRetentionTime(), PrecursorTolerance, PeakTolerance, p, new DirectoryInfo(TargetDirectory), GroupByScanMode)); }