public void Run() { ITableNGlycan glycan = new ComplexNGlycan(new int[24]); Console.WriteLine(glycan.GetName()); //glycan.SetNGlycanTable(0, 1); ITableNGlycanProxy glycanProxy = new GeneralTableNGlycanMassProxy(glycan); ITableNGlycanProxyGenerator generator = new GeneralTableNGlycanMassProxyGenerator(); IGlycanCreator glycanCreator = new GeneralTableNGlycanCreator(generator, glycanProxy); List <IGlycan> glycans = glycanCreator.Create(); //foreach(IGlycan g in glycans) //{ // Console.WriteLine(string.Join(" ", g.GetStructure())); //} IGlycoPeptideProxyGenerator glycoPeptideProxyGenerator = new GeneralTableNGlycoPeptideMassProxyGenerator(); IGlycoPeptideCreator glycoPeptideCreator = new GeneralNGlycoPeptideSingleSiteCreator(glycoPeptideProxyGenerator); IPeptide peptide = new GeneralPeptide("test3", "ILGGHLDAKGSFPWQAKMVSHHNLTTGATLINEQWLLTTAK"); foreach (IGlycan g in glycans) { List <IGlycoPeptide> glycoPeptides = glycoPeptideCreator.Create(g, peptide); //Console.WriteLine(glycoPeptides.Count); foreach (IGlycoPeptide glyco in glycoPeptides) { //Console.WriteLine(glyco.GetGlycan().GetName()); //Console.WriteLine(glyco.GetPosition()); } } Console.Read(); }
public IGlycoPeptide createGlyco() { int[] structTable = new int[24]; structTable[0] = 1; IPeptide peptide = new GeneralPeptide("test3", "ILGGHLDAKGSFPWQAKMVSHHNLTTGATLINEQWLLTTAK"); IGlycoPeptide glycoPeptide = new GeneralGlycoPeptide(new ComplexNGlycan(structTable), peptide, 0); return(glycoPeptide); }
public override List <IPeptide> CreateNewPeptides(string id, List <string> pepList) { List <IPeptide> peptideList = new List <IPeptide>(); foreach (string sequence in pepList) { GeneralPeptide peptide = new GeneralPeptide(id, sequence); peptideList.Add(peptide); } return(peptideList); }
public List <IPeptide> Create(IProtein protein) { List <IPeptide> peptideList = new List <IPeptide>(); List <string> sequences = generator.Generate(protein.GetSequence()); foreach (string seq in sequences) { GeneralPeptide peptide = new GeneralPeptide(protein.GetID(), seq); peptideList.Add(peptide); } protein.SetPeptides(peptideList); return(peptideList); }
public void Run() { //AccumulatedStructBruteForceNGlycanCreator creator = new AccumulatedStructBruteForceNGlycanCreator(); //creator.Generate(); ////http://db.systemsbiology.net:8080/proteomicsToolkit/FragIonServlet.html IPeptide peptide = new GeneralPeptide("test", "VVLHPNYSQVD"); //IPeptide peptide = new GeneralPeptide("test", "SRNLTK"); //IPeptide peptide = new GeneralPeptide("test", "LCPDCPLLAPLNDSR"); ICalcMass calculator = UtilMass.Instance; ICalcMassOption option = UtilMassOption.Instance; //double mass = calculator.CalcPeptideMass(peptide, option); //1154.63213937 // //double mass = calculator.CalcPeptideMass(peptide, option); //double mass = calculator.CalcPeptideIonMass("CHS", IonType.xIon, option); //Console.WriteLine(mass); //double mass = calculator.CalcPeptideIonMass("VVLHPNYSQV", IonType.cIon, option); //Console.WriteLine(mass); //mass = calculator.CalcPeptideIonMass("CHS", IonType.zIon, option); //Console.WriteLine(mass); //IGlycan glycan = new GeneralGlycan(6, 7, 2, 3, 0); IGlycan glycan = new GeneralGlycan(1, 0, 0, 0, 0); //option.SetPermethylation(true); double mass = calculator.CalcPeptideMass(peptide, option); mass += calculator.CalcGlycanMass(glycan, option); //mass = calculator.CalcGlycanYIonMass(glycan, option); //peptide = new GeneralPeptide("1", "EPTIDE"); //mass = calculator.CalcPeptideIonMass(peptide, IonType.xIon, option); //Console.WriteLine((mass+Hydrogen)/1); //peptide = new GeneralPeptide("1", "TIDE"); //mass = calculator.CalcPeptideIonMass(peptide, IonType.xIon, option); //Console.WriteLine((mass+Hydrogen)/1); //2322.82285937 Console.WriteLine(mass); Console.WriteLine(mass / 1.0 + Hydrogen); //Console.WriteLine(calculator.CalcPPM(mass, 329.09256)); Console.Read(); }