Esempio n. 1
0
        public static void SetPep(Identifications identifications, BayesianInversion2D bi)
        {
            int n = identifications.Count;

            for (int i = 0; i < n; i++)
            {
                MascotPeptide p = identifications.GetPeptidesAt(i)[0];
                p.Pep = bi.GetValue(p.AltScore, Math.Log(p.Sequence.Length));
            }
            identifications.Write();
        }
Esempio n. 2
0
        private static void Write(string[] rawFiles, BayesianInversion2D bi)
        {
            string combinedFolder = rawFiles[0].Substring(0, rawFiles[0].LastIndexOf("\\")) + "\\combined";

            for (int len = 6; len <= 80; len++)
            {
                double       loglen   = Math.Log(len);
                string       filename = "scoreDist" + len + ".txt";
                StreamWriter writer   = new StreamWriter(combinedFolder + "\\" + filename);
                for (double score = 0; score < 600; score += 0.5)
                {
                    double pep  = bi.GetValue(score, loglen);
                    double forw = bi.GetForwardHist(score, loglen);
                    double reve = bi.GetReverseHist(score, loglen);
                    writer.WriteLine(score + "\t" + pep + "\t" + forw + "\t" + reve);
                }
                writer.Close();
            }
        }