public clsAlignmentFunction GetAlignment(List <TargetBase> massTagList, List <TargetedResultDTO> featuresToAlign)
        {
            var multialignMassTagDB = new clsMassTagDB();

            //TODO: I might be able to dynamically update these values. Take my foundFeatures and calculate their avg PPMDiff. Then use that info here.
            var alignmentOptions = new clsAlignmentOptions();

            alignmentOptions.MassCalibrationWindow         = this.AlignerParameters.MassCalibrationWindow; //note -  it seems that 50 ppm is used as a default setting in VIPER.
            alignmentOptions.ContractionFactor             = this.AlignerParameters.ContractionFactor;
            alignmentOptions.IsAlignmentBaselineAMasstagDB = this.AlignerParameters.IsAlignmentBaselineAMassTagDB;
            alignmentOptions.MassBinSize = this.AlignerParameters.MassBinSize;
            alignmentOptions.MassCalibrationLSQNumKnots      = this.AlignerParameters.MassCalibrationLSQNumKnots;
            alignmentOptions.MassCalibrationLSQZScore        = this.AlignerParameters.MassCalibrationLSQZScore;
            alignmentOptions.MassCalibrationMaxJump          = this.AlignerParameters.MassCalibrationMaxJump;
            alignmentOptions.MassCalibrationMaxZScore        = this.AlignerParameters.MassCalibrationMaxZScore;
            alignmentOptions.MassCalibrationNumMassDeltaBins = this.AlignerParameters.MassCalibrationNumMassDeltaBins;
            alignmentOptions.MassCalibrationNumXSlices       = this.AlignerParameters.MassCalibrationNumXSlices;
            alignmentOptions.MassCalibrationUseLSQ           = this.AlignerParameters.MassCalibrationUseLSQ;
            alignmentOptions.MassCalibrationWindow           = this.AlignerParameters.MassCalibrationWindow;
            alignmentOptions.MassTolerance        = this.AlignerParameters.MassToleranceForNETAlignment;
            alignmentOptions.MaxPromiscuity       = this.AlignerParameters.MaxPromiscuity;
            alignmentOptions.MaxTimeJump          = this.AlignerParameters.MaxTimeJump;
            alignmentOptions.NETBinSize           = this.AlignerParameters.NETBinSize;
            alignmentOptions.NETTolerance         = this.AlignerParameters.NETTolerance;
            alignmentOptions.NumTimeSections      = this.AlignerParameters.NumTimeSections;
            alignmentOptions.UsePromiscuousPoints = this.AlignerParameters.UsePromiscuousPoints;

            var processor = new clsAlignmentProcessor();

            processor.AlignmentOptions = alignmentOptions;


            var multiAlignMassTags = convertDeconToolsMassTagsToMultialignMassTags(massTagList);

            multialignMassTagDB.AddMassTags(multiAlignMassTags);
            processor.SetReferenceDatasetFeatures(multialignMassTagDB);

            var multialignUMCs = convertDeconToolsLCMSFeaturesToMultialignFeatures(featuresToAlign);

            processor.SetAligneeDatasetFeatures(multialignUMCs, alignmentOptions.MZBoundaries[0]);
            processor.PerformAlignmentToMSFeatures();

            this.Result = getResultsForAlignment(processor);


            return(processor.GetAlignmentFunction());
        }
Beispiel #2
0
        public clsAlignmentFunction GetAlignment(List <MassTag> massTagList, List <TargetedResult> featuresToAlign)
        {
            clsMassTagDB multialignMassTagDB = new clsMassTagDB();

            //TODO: figure out which options I need to parameterize in this class. For now, use defaults
            clsAlignmentOptions   alignmentOptions = new clsAlignmentOptions();
            clsAlignmentProcessor processor        = new clsAlignmentProcessor();


            clsMassTag[] multiAlignMassTags = convertDeconToolsMassTagsToMultialignMassTags(massTagList);

            multialignMassTagDB.AddMassTags(multiAlignMassTags);
            processor.SetReferenceDatasetFeatures(multialignMassTagDB);

            List <clsUMC> multialignUMCs = convertDeconToolsLCMSFeaturesToMultialignFeatures(featuresToAlign);

            processor.SetAligneeDatasetFeatures(multialignUMCs, alignmentOptions.MZBoundaries[0]);
            processor.PerformAlignmentToMSFeatures();

            return(processor.GetAlignmentFunction());
        }