예제 #1
0
        protected virtual void InitializeProcessingTasks()
        {
            MSGenerator  = MSGeneratorFactory.CreateMSGenerator(Run.MSFileType);
            PeakDetector = PeakDetectorFactory.CreatePeakDetector(NewDeconToolsParameters);
            Deconvolutor = DeconvolutorFactory.CreateDeconvolutor(NewDeconToolsParameters);

            //the new iThrash imports the _peaks.txt file
            if (Deconvolutor is DeconTools.Backend.ProcessingTasks.Deconvoluters.InformedThrashDeconvolutor)
            {
                _deconvolutorRequiresPeaksFile = true;
            }

            //Will initialize these but whether or not they are used are determined elsewhere
            ZeroFiller = new DeconToolsZeroFiller(NewDeconToolsParameters.MiscMSProcessingParameters.ZeroFillingNumZerosToFill);
            Smoother   = new SavitzkyGolaySmoother(NewDeconToolsParameters.MiscMSProcessingParameters.SavitzkyGolayNumPointsInSmooth,
                                                   NewDeconToolsParameters.MiscMSProcessingParameters.SavitzkyGolayOrder);

            FitScoreCalculator = new DeconToolsFitScoreCalculator();
            ScanResultUpdater  = new ScanResultUpdater(NewDeconToolsParameters.ScanBasedWorkflowParameters.ProcessMS2);
            ResultValidator    = new ResultValidatorTask();

            IsosResultExporter = IsosExporterFactory.CreateIsosExporter(Run.ResultCollection.ResultType, ExporterType,
                                                                        IsosOutputFileName);

            ScanResultExporter = ScansExporterFactory.CreateScansExporter(Run.MSFileType, ExporterType,
                                                                          ScansOutputFileName);

            if (!_deconvolutorRequiresPeaksFile)
            {
                PeakListExporter = PeakListExporterFactory.Create(ExporterType, Run.MSFileType, PeakListExporterTriggerValue,
                                                                  PeakListOutputFileName);
            }

            PeakToMSFeatureAssociator = new PeakToMSFeatureAssociator();
        }
예제 #2
0
        protected override void InitializeProcessingTasks()
        {
            MSGenerator  = MSGeneratorFactory.CreateMSGenerator(Run.MSFileType);
            PeakDetector = PeakDetectorFactory.CreatePeakDetector(NewDeconToolsParameters);


            var moreSensitivePeakToBackgroundRatio = NewDeconToolsParameters.PeakDetectorParameters.PeakToBackgroundRatio / 2;
            var moreSensitiveSigNoiseThresh        = NewDeconToolsParameters.PeakDetectorParameters.SignalToNoiseThreshold;

            _moreSensitiveMS1PeakDetector = new DeconToolsPeakDetectorV2(moreSensitivePeakToBackgroundRatio,
                                                                         moreSensitiveSigNoiseThresh, NewDeconToolsParameters.PeakDetectorParameters.PeakFitType,
                                                                         NewDeconToolsParameters.PeakDetectorParameters.IsDataThresholded);

            _superSensitiveMS1PeakDetector = new DeconToolsPeakDetectorV2(0, 0, NewDeconToolsParameters.PeakDetectorParameters.PeakFitType,
                                                                          NewDeconToolsParameters.PeakDetectorParameters.IsDataThresholded);


            Deconvolutor = DeconvolutorFactory.CreateDeconvolutor(NewDeconToolsParameters);


            //Will initialize these but whether or not they are used are determined elsewhere
            ZeroFiller = new DeconToolsZeroFiller(NewDeconToolsParameters.MiscMSProcessingParameters.ZeroFillingNumZerosToFill);
            Smoother   = new SavitzkyGolaySmoother(NewDeconToolsParameters.MiscMSProcessingParameters.SavitzkyGolayNumPointsInSmooth,
                                                   NewDeconToolsParameters.MiscMSProcessingParameters.SavitzkyGolayOrder);

            FitScoreCalculator = new DeconToolsFitScoreCalculator();

            ResultValidator = new ResultValidatorTask();


            PeakToMSFeatureAssociator = new PeakToMSFeatureAssociator();


            _ms2PeakDetectorForCentroidData = new DeconToolsPeakDetectorV2(0, 0, Globals.PeakFitType.QUADRATIC, true)
            {
                RawDataType = Globals.RawDataType.Centroided
            };


            _ms2PeakDetectorForProfileData = new DeconToolsPeakDetectorV2(NewDeconToolsParameters.PeakDetectorParameters.PeakToBackgroundRatio,
                                                                          NewDeconToolsParameters.PeakDetectorParameters.SignalToNoiseThreshold,
                                                                          NewDeconToolsParameters.PeakDetectorParameters.PeakFitType,
                                                                          NewDeconToolsParameters.PeakDetectorParameters.IsDataThresholded);

            Check.Ensure(Deconvolutor is ThrashDeconvolutorV2, "Error. Currently the DeconMSn workflow only works with the ThrashV2 deconvolutor. Selected deconvolutor= " + Deconvolutor);
        }