public string GetTargetFile(IIdentifiedSpectrum peptide)
        {
            var result = MyConvert.Format(@"{0}\{1}_{2}_{3}_{4}.chro.tsv",
                                          GetTargetDirectory(peptide),
                                          peptide.Query.FileScan.Experimental.Replace(" ", "_"),
                                          peptide.Peptide.PureSequence,
                                          Math.Round(peptide.GetTheoreticalMz()),
                                          peptide.Query.FileScan.FirstScan);

            return(new FileInfo(result).FullName);
        }
Esempio n. 2
0
        private static double GetTheoretialO16Mz(double gapO18O16, IIdentifiedSpectrum mphit)
        {
            double result = mphit.GetTheoreticalMz();

            if (mphit.Modifications.Contains("18O(1)"))
            {
                result -= gapO18O16 / mphit.Query.Charge;
            }
            else if (mphit.Modifications.Contains("18O(2)"))
            {
                result -= (gapO18O16 * 2) / mphit.Query.Charge;
            }
            return(result);
        }
        public string GetTargetFile(IIdentifiedSpectrum peptide)
        {
            var exp       = peptide.Query.FileScan.Experimental.Replace(" ", "_");
            var targetdir = String.Format(@"{0}\{1}", GetTargetDirectory(), exp);

            if (!Directory.Exists(targetdir))
            {
                Directory.CreateDirectory(targetdir);
            }

            var result = String.Format(@"{0}\{1}_{2}_{3}.chro.tsv",
                                       targetdir,
                                       peptide.Peptide.PureSequence,
                                       Math.Round(peptide.GetTheoreticalMz()),
                                       peptide.Query.FileScan.FirstScan);

            return(new FileInfo(result).FullName);
        }
        public List <Envelope> Build(IIdentifiedSpectrum mphit)
        {
            double theoreticalMz = mphit.GetTheoreticalMz();

            if (mphit.Modifications.Contains("18O(1)"))
            {
                theoreticalMz -= gapO18O16 / mphit.Query.Charge;
            }
            else if (mphit.Modifications.Contains("18O(2)"))
            {
                theoreticalMz -= (gapO18O16 * 2) / mphit.Query.Charge;
            }

            List <Envelope> result = new List <Envelope>();

            result.Add(new Envelope(theoreticalMz, mphit.Query.Charge, profileLength));

            return(result);
        }