Ejemplo n.º 1
0
        /// <summary>
        /// Constructor for a MS2 scan
        /// </summary>
        public clsScanInfo(double fragScanParentIonMz)
        {
            MRMScanType = MRMScanTypeConstants.NotMRM;

            FragScanInfo = new clsFragScanInfo(fragScanParentIonMz);
            MRMScanInfo  = new clsMRMScanInfo();

            ExtendedHeaderInfo = new Dictionary <int, string>();
        }
Ejemplo n.º 2
0
 private bool MRMParentDaughterMatch(
     udtSRMListType udtSRMListEntry,
     clsMRMScanInfo mrmSettingsEntry,
     int mrmMassIndex)
 {
     return(MRMParentDaughterMatch(
                udtSRMListEntry.ParentIonMZ,
                udtSRMListEntry.CentralMass,
                mrmSettingsEntry.ParentIonMZ,
                mrmSettingsEntry.MRMMassList[mrmMassIndex].CentralMass));
 }
Ejemplo n.º 3
0
        private string GenerateMRMInfoHash(clsMRMScanInfo mrmScanInfo)
        {
            var hashValue = mrmScanInfo.ParentIonMZ + "_" + mrmScanInfo.MRMMassCount;

            for (var index = 0; index < mrmScanInfo.MRMMassCount; index++)
            {
                hashValue += "_" +
                             mrmScanInfo.MRMMassList[index].CentralMass.ToString("0.000") + "_" +
                             mrmScanInfo.MRMMassList[index].StartMass.ToString("0.000") + "_" +
                             mrmScanInfo.MRMMassList[index].EndMass.ToString("0.000");
            }
            return(hashValue);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Add the parent ion, or associate the fragmentation scan with an existing parent ion
        /// </summary>
        /// <param name="scanList"></param>
        /// <param name="surveyScanIndex"></param>
        /// <param name="parentIonMZ"></param>
        /// <param name="mrmInfo"></param>
        /// <param name="spectraCache"></param>
        /// <param name="sicOptions"></param>
        public void AddUpdateParentIons(
            clsScanList scanList,
            int surveyScanIndex,
            double parentIonMZ,
            clsMRMScanInfo mrmInfo,
            clsSpectraCache spectraCache,
            clsSICOptions sicOptions)
        {
            for (var mrmIndex = 0; mrmIndex < mrmInfo.MRMMassCount; mrmIndex++)
            {
                var mrmDaughterMZ         = mrmInfo.MRMMassList[mrmIndex].CentralMass;
                var mrmToleranceHalfWidth = Math.Round((mrmInfo.MRMMassList[mrmIndex].EndMass - mrmInfo.MRMMassList[mrmIndex].StartMass) / 2, 6);
                if (mrmToleranceHalfWidth < 0.001)
                {
                    mrmToleranceHalfWidth = 0.001;
                }

                AddUpdateParentIons(scanList, surveyScanIndex, parentIonMZ, mrmDaughterMZ, mrmToleranceHalfWidth, scanList.FragScans.Count - 1, spectraCache, sicOptions);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Duplicate MRM info
        /// </summary>
        /// <param name="sourceInfo"></param>
        /// <returns></returns>
        private clsMRMScanInfo DuplicateMRMInfo(clsMRMScanInfo sourceInfo)
        {
            var targetInfo = new clsMRMScanInfo
            {
                ParentIonMZ        = sourceInfo.ParentIonMZ,
                MRMMassCount       = sourceInfo.MRMMassCount,
                ScanCount          = sourceInfo.ScanCount,
                ParentIonInfoIndex = sourceInfo.ParentIonInfoIndex,
            };

            if (sourceInfo.MRMMassList == null)
            {
                targetInfo.MRMMassList = new List <udtMRMMassRangeType>();
            }
            else
            {
                targetInfo.MRMMassList = new List <udtMRMMassRangeType>(sourceInfo.MRMMassList.Count);
                targetInfo.MRMMassList.AddRange(sourceInfo.MRMMassList);
            }

            return(targetInfo);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Duplicate MRM info, overriding the parent ion m/z using parentIonMZ
        /// </summary>
        /// <param name="sourceInfo"></param>
        /// <param name="parentIonMZ"></param>
        /// <returns></returns>
        public static clsMRMScanInfo DuplicateMRMInfo(
            MRMInfo sourceInfo,
            double parentIonMZ)
        {
            var targetInfo = new clsMRMScanInfo
            {
                ParentIonMZ        = parentIonMZ,
                MRMMassCount       = sourceInfo.MRMMassList.Count,
                ScanCount          = 0,
                ParentIonInfoIndex = -1,
            };

            if (sourceInfo.MRMMassList == null)
            {
                targetInfo.MRMMassList = new List <udtMRMMassRangeType>();
            }
            else
            {
                targetInfo.MRMMassList = new List <udtMRMMassRangeType>(sourceInfo.MRMMassList.Count);
                targetInfo.MRMMassList.AddRange(sourceInfo.MRMMassList);
            }

            return(targetInfo);
        }