public static void TestBuildGlycoPeptideHypothesis() { String testGlycanCompositionFile = @"TestData\Glycresoft glycan hypothesis.csv"; CompositionHypothesis glycanHypothesis = new CompositionHypothesis(); glycanHypothesis.ParseCompositionHypothesisCsv<GlycanComposition>(testGlycanCompositionFile); String testMSDigestFile = @"TestData\KK-USSR-digest-Prospector output.xml"; MSDigestReport msdigest = MSDigestReport.Load(testMSDigestFile); int counter = 0; foreach (MSDigestPeptide pep in msdigest.Peptides) { counter += pep.NumGlycosylations; if (counter > 30) { pep.NumGlycosylations = 0; } } try { GlycopeptideCompositionHypothesisBuilder builder = new GlycopeptideCompositionHypothesisBuilder(glycanHypothesis, msdigest.Peptides); Console.WriteLine("Building Hypothesis"); builder.BuildCompositionHypothesis(); Console.WriteLine(builder.GlycopeptideComposition); builder.GlycopeptideComposition.WriteCompositionHypothesisCsv("TestData/TestOutputHypothesis.csv"); } catch (OutOfMemoryException ex) { Console.WriteLine("\n\n\n!!!!!!!!!!!!!!!!Combinatorics exceeded memory size!", ex.Message, "\n\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!"); } }
private void BuildGlycopeptideHypothesis2(string compositionHypothesisPath, List<MSDigestPeptide> peptides) { CompositionHypothesis.CompositionHypothesis glycans = CompositionHypothesis.CompositionHypothesis.ParseCsv<GlycanComposition>(compositionHypothesisPath); GlycopeptideCompositionHypothesisBuilder glycopeptideHypothesisBuilder = new GlycopeptideCompositionHypothesisBuilder(glycans, peptides); glycopeptideHypothesisBuilder.BuildCompositionHypothesis(); GlycanHypothesisCombinatorialGenerator GD = new GlycanHypothesisCombinatorialGenerator(); theComhypoOnTab2 = BuildCompositionHypothesisDataTable(glycopeptideHypothesisBuilder.GlycopeptideComposition); }