public override IEnumerable <string> Process(string fileName)
        {
            MaxQuantPeptideTextFormat format = new MaxQuantPeptideTextFormat();

            var spectra = format.ReadFromFile(fileName);

            var ratioResult     = fileName + ".ratio";
            var ratioNormResult = fileName + ".norm.ratio";

            ExtractRatio(spectra, ratioResult, m => m.Ratio);
            ExtractRatio(spectra, ratioNormResult, m => m.Ratio_Norm);

            return(new[] { ratioResult, ratioNormResult });
        }
        public void TestReadPeptideFile()
        {
            MaxQuantPeptideTextFormat reader = new MaxQuantPeptideTextFormat();

            var spectra = reader.ReadFromFile(TestContext.CurrentContext.TestDirectory + "/../../../data/maxquant.peptides.txt");

            for (int i = 0; i < spectra.Count; i++)
            {
                var s = spectra[i];
                if (s.Query.FileScan.Experimental == "exp3_T_SAX_091215_02")
                {
                    Console.WriteLine("{0}, {1}", i, s.Query.FileScan.LongFileName);
                    //break;
                }
            }
        }
        public void TestRead()
        {
            MaxQuantPeptideTextFormat reader = new MaxQuantPeptideTextFormat();
            var spectra = reader.ReadFromFile(TestContext.CurrentContext.TestDirectory + "/../../../data/All_Phospho (STY)Sites.txt");

            Assert.AreEqual(1, spectra.Count);
            var m = spectra[0].GetMaxQuantItemList();

            Assert.IsNotNull(m);
            Assert.AreEqual(6, m.Count);
            var dsNames = m.GetDatasetNames();

            Assert.IsTrue(dsNames.Contains("0min"));
            Assert.IsTrue(dsNames.Contains("5min"));
            Assert.IsTrue(dsNames.Contains("15min"));
            Assert.IsTrue(dsNames.Contains("30min"));
            Assert.IsTrue(dsNames.Contains("60min"));
            Assert.IsTrue(dsNames.Contains("120min"));

            reader.ResetBySpectra(spectra);
            reader.WriteToFile(@TestContext.CurrentContext.TestDirectory + "/../../../data//All_Phospho (STY)Sites.txt.copy", spectra);
        }