Ejemplo n.º 1
0
        public void GenerateTheoreticalProfileFromAve()
        {
            var isIt = isotopicDistributionCalculator.IsSetToLabeled;

            isotopicDistributionCalculator.SetLabeling("N", 14, .02, 15, .98);
            var cluster = isotopicDistributionCalculator.GetAveraginePattern(1979);

            isotopicDistributionCalculator.ResetToUnlabeled();
            var sb = new StringBuilder();

            sb.Append(Environment.NewLine);
            TestUtilities.IsotopicProfileDataToStringBuilder(sb, cluster);

            Console.Write(sb.ToString());


            var cluster2 = _tomIsotopicPatternGenerator.GetAvnPattern(2000, true);


            Console.WriteLine(cluster2.Peaklist.Count);


            sb.Append(Environment.NewLine);
            TestUtilities.IsotopicProfileDataToStringBuilder(sb, cluster2);

            Console.WriteLine(sb.ToString());
        }
        /// <summary>
        /// Method for creating all theoretical profiles in advance. There's not much advantage in doing this...
        /// </summary>
        /// <param name="startMass"></param>
        /// <param name="stopMass"></param>
        private void CreateAllTheoreticalProfilesForMassRange(int startMass = 400, int stopMass = 5000)
        {
            for (var i = startMass; i <= stopMass; i++)
            {
                var profile = _isotopicDistCalculator.GetAveraginePattern(i);

                _averagineProfileLookupTable.Add(i, profile);
            }
        }
        public override void GenerateTheorFeature(TargetBase mt)
        {
            Check.Require(mt != null, "FeatureGenerator failed. Target must not be null.");
            var iso = IsotopicDistCalculator.GetAveraginePattern(mt.MZ);

            PeakUtilities.TrimIsotopicProfile(iso, LowPeakCutOff);
            iso.ChargeState    = mt.ChargeState;
            mt.IsotopicProfile = iso;
        }