示例#1
0
        public SpectraPredictor(SpectralPredictionParameters myparams)
        {
            myParams = myparams;

            aam = new AminoacidMasses();

            if (myParams.IsMonoisotopic)
            {
                aaDict = PatternTools.ObjectCopier.Clone(aam.IsotopicDic);
            }
            else
            {
                aaDict = PatternTools.ObjectCopier.Clone(aam.AverageDic);
            }

            //Handle the modifications
            foreach (ModificationItem m in myparams.MyModifications)
            {
                if (m.IsVariable)
                {
                    string key  = m.AminoAcid + "(" + m.DeltaMass + ")";
                    double mass = m.DeltaMass + aaDict[m.AminoAcid];
                    aaDict.Add(key, mass);
                }
                else
                {
                    aaDict[m.AminoAcid] += m.DeltaMass;
                }
            }
        }
示例#2
0
        public SequentialScore(double ppmTolerance, List <ModificationItem> modifications, double intensityPercentageCuttoff, int resultBuffer)
        {
            PatternTools.AminoacidMasses aa = new AminoacidMasses();
            gapItems   = aa.GenerateDeltaMassTable2(ppmTolerance, modifications);
            largestGap = gapItems.Max(a => a.GapSize) + 0.3;

            this.ppmTolerance = ppmTolerance;
            this.intensityPercentageCuttoff = intensityPercentageCuttoff;
            this.resultBuffer = resultBuffer;
        }