public void ClearNTerminusMod() { ChemicalFormula formula = new ChemicalFormula("Fe"); _mockPeptideEveryAminoAcid.SetModification(formula, Terminus.N); _mockPeptideEveryAminoAcid.ClearModifications(Terminus.N); Assert.IsNull(_mockPeptideEveryAminoAcid.NTerminusModification); }
public void ClearModificationsBySites() { var peptide = new Peptide("AC[Fe]DEFGHIKLMNP[Fe]QRSTV[Fe]WY"); peptide.ClearModifications(ModificationSites.C | ModificationSites.V); Assert.AreEqual("ACDEFGHIKLMNP[Fe]QRSTVWY", peptide.ToString()); }
public void ClearModificationsBySites() { var peptide = new Peptide("AC[Fe]DEFGHIKLMNP[Fe]QRSTV[Fe]WY"); peptide.ClearModifications(ModificationSites.C | ModificationSites.V); Assert.AreEqual("ACDEFGHIKLMNP[Fe]QRSTVWY", peptide.ToString()); }
public void TestClearModifications() { Peptide a = new Peptide("ACDEFGHIKLMNPQRSTVWY"); a.AddModification(new OldSchoolChemicalFormulaModification(ChemicalFormula.ParseFormula("O"), ModificationSites.D)); a.AddModification(new OldSchoolChemicalFormulaModification(ChemicalFormula.ParseFormula("H"), ModificationSites.E)); Assert.AreEqual(2, a.ModificationCount()); a.ClearModifications(); Assert.AreEqual(0, a.ModificationCount()); a.AddModification(new OldSchoolChemicalFormulaModification(ChemicalFormula.ParseFormula("O"), ModificationSites.NTerminus)); a.AddModification(new OldSchoolModification(1), ModificationSites.TerminusC); Assert.AreEqual(2, a.ModificationCount()); a.Fragment(FragmentTypes.y); Peptide peptide = new Peptide("[C2H3NO]-LLL-[C2H3NO]"); ModificationSites ff = ModificationSites.NPep | ModificationSites.PepC; peptide.ClearModifications(ff); Assert.AreEqual("LLL", peptide.GetSequenceWithModifications()); }
public void ClearMods() { Peptide pepA = new Peptide("DE[Al]R[Fe]EK"); pepA.ClearModifications(new OldSchoolChemicalFormulaModification(ChemicalFormula.ParseFormula("Al"))); Assert.AreEqual("DER[Fe]EK", pepA.ToString()); pepA.ClearModifications(new OldSchoolChemicalFormulaModification(ChemicalFormula.ParseFormula("C"))); Assert.AreEqual("DER[Fe]EK", pepA.ToString()); pepA.ClearModifications(); Assert.AreEqual("DEREK", pepA.ToString()); pepA.ClearModifications(); Assert.AreEqual("DEREK", pepA.ToString()); pepA.ClearModifications(ModificationSites.Any); Assert.AreEqual("DEREK", pepA.ToString()); pepA.ClearModifications(Terminus.C); Assert.AreEqual("DEREK", pepA.ToString()); }